fix[devtools/inspect]: null check memoized props before trying to call hasOwnProperty (#27057)
Simple check to avoid `TypeError`, quite rare case, but still.
Ruslan Lesiutin committed
Jul 13, 2023 at 14:13 UTC
546fe4681c52de6a333a55cedb141c87b626425e
1 file changed
+1
-1
packages/react-devtools-shared/src/backend/renderer.js
+1
-1
@@ -3280,7 +3280,7 @@ export function attach(
3280
};
3281
3282
if (enableStyleXFeatures) {
3283
- if (memoizedProps.hasOwnProperty('xstyle')) {
3283
+ if (memoizedProps != null && memoizedProps.hasOwnProperty('xstyle')) {
3284
plugins.stylex = getStyleXData(memoizedProps.xstyle);
3285
}
3286
}