diff --git a/packages/react-devtools-shared/src/devtools/views/Components/Tree.js b/packages/react-devtools-shared/src/devtools/views/Components/Tree.js index af2ad094b475d..507b38b71d423 100644 --- a/packages/react-devtools-shared/src/devtools/views/Components/Tree.js +++ b/packages/react-devtools-shared/src/devtools/views/Components/Tree.js @@ -562,7 +562,10 @@ function InnerElementType({children, style, ...rest}) { // a temporary workaround for https://github.com/facebook/react/issues/24626 // removing `pointerEvents` to ensure this is always clickable // TODO: find a better way to fix this (maybe on react-window side) - const {pointerEvents, ...cleanStyle} = style; + const cleanStyle = {...style}; + if (cleanStyle.pointerEvents != null) { + delete cleanStyle.pointerEvents; + } // This style override enables the background color to fill the full visible width, // when combined with the CSS tweaks in Element.