@samitouri / QOS-React / commits / 7683211efd

Fix Flow (#8857)

Dan Abramov committed Jan 24, 2017 at 13:45 UTC 7683211efd1ed77636af181af05d4b5cd8edafed
1 file changed +2 -1
src/shared/utils/getComponentName.js
+2 -1
@@ -19,7 +19,7 @@ function getComponentName(instanceOrFiber : ReactInstance | Fiber) : string | nu
19 if (typeof instanceOrFiber.getName === 'function') {
20 // Stack reconciler
21 const instance = ((instanceOrFiber : any) : ReactInstance);
22 - return instance.getName() || 'Component';
22 + return instance.getName() || 'Component' || null;
23 }
24 if (typeof instanceOrFiber.tag === 'number') {
25 // Fiber reconciler
@@ -32,6 +32,7 @@ function getComponentName(instanceOrFiber : ReactInstance | Fiber) : string | nu
32 return type.displayName || type.name || null;
33 }
34 }
35 + return null;
36 }
37
38 module.exports = getComponentName;