Fix future sketchy-null errors after bug fix in '@flow strict' files

Reviewed By: wcheng86

Differential Revision: D9599872

fbshipit-source-id: dabcfd6fb7b6ec5a13801e84fe55d7d3c7ba9adb
This commit is contained in:
George Zahariev 2018-08-30 20:56:35 -07:00 committed by Facebook Github Bot
parent e84bf99d40
commit 2f745ec2c2
1 changed files with 6 additions and 2 deletions

View File

@ -41,12 +41,16 @@
// If nothing changed, avoid recreating a bundle blob by reusing the // If nothing changed, avoid recreating a bundle blob by reusing the
// previous one. // previous one.
if (deltaPatcher.getLastNumModifiedFiles() === 0 && cachedBundle) { if (
deltaPatcher.getLastNumModifiedFiles() === 0 &&
cachedBundle != null &&
cachedBundle !== ''
) {
return cachedBundle; return cachedBundle;
} }
// Clean up the previous bundle URL to not leak memory. // Clean up the previous bundle URL to not leak memory.
if (cachedBundle) { if (cachedBundle != null && cachedBundle !== '') {
URL.revokeObjectURL(cachedBundle); URL.revokeObjectURL(cachedBundle);
} }