Skip to content

Commit 546fe46

Browse files
authored
fix[devtools/inspect]: null check memoized props before trying to call hasOwnProperty (#27057)
Simple check to avoid `TypeError`, quite rare case, but still.
1 parent 9377e10 commit 546fe46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/react-devtools-shared/src/backend/renderer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3280,7 +3280,7 @@ export function attach(
32803280
};
32813281

32823282
if (enableStyleXFeatures) {
3283-
if (memoizedProps.hasOwnProperty('xstyle')) {
3283+
if (memoizedProps != null && memoizedProps.hasOwnProperty('xstyle')) {
32843284
plugins.stylex = getStyleXData(memoizedProps.xstyle);
32853285
}
32863286
}

0 commit comments

Comments
 (0)