Added explicit null return to completeUnitOfWork() to resolve Flow error (#9299)
Brian Vaughn committed
Mar 30, 2017 at 15:45 UTC
4f69474e03bbc5fe8f4282a4790677779dec4a31
1 file changed
+4
src/renderers/shared/fiber/ReactFiberScheduler.js
+4
@@ -684,6 +684,10 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(
684
return null;
685
}
686
}
687
+
688
+ // Without this explicit null return Flow complains of invalid return type
689
+ // TODO Remove the above while(true) loop
690
+ return null;
691
}
692
693
function performUnitOfWork(workInProgress: Fiber): Fiber | null {