@samitouri / QOS-React-2 / commits / 1e3b0b520e

Added a null check around memoizedProps

Brian Vaughn committed Aug 24, 2019 at 09:04 UTC 1e3b0b520e1d77ed3926ac9e41bea3a5c7309cad
1 file changed +4 -1
src/backend/renderer.js
+4 -1
@@ -2067,7 +2067,10 @@ export function attach(
2067 let fiber = findCurrentFiberUsingSlowPathById(id);
2068 if (fiber !== null) {
2069 instance = fiber.stateNode;
2070 - style = fiber.memoizedProps.style;
2070 +
2071 + if (fiber.memoizedProps !== null) {
2072 + style = fiber.memoizedProps.style;
2073 + }
2074 }
2075
2076 return { instance, style };