From 2f745ec2c227e79230c38e038df942f5b0e61a36 Mon Sep 17 00:00:00 2001 From: George Zahariev Date: Thu, 30 Aug 2018 20:56:35 -0700 Subject: [PATCH] Fix future sketchy-null errors after bug fix in '@flow strict' files Reviewed By: wcheng86 Differential Revision: D9599872 fbshipit-source-id: dabcfd6fb7b6ec5a13801e84fe55d7d3c7ba9adb --- local-cli/server/util/debugger-ui/deltaUrlToBlobUrl.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/local-cli/server/util/debugger-ui/deltaUrlToBlobUrl.js b/local-cli/server/util/debugger-ui/deltaUrlToBlobUrl.js index d916ad4e9..bc0ed845b 100644 --- a/local-cli/server/util/debugger-ui/deltaUrlToBlobUrl.js +++ b/local-cli/server/util/debugger-ui/deltaUrlToBlobUrl.js @@ -41,12 +41,16 @@ // If nothing changed, avoid recreating a bundle blob by reusing the // previous one. - if (deltaPatcher.getLastNumModifiedFiles() === 0 && cachedBundle) { + if ( + deltaPatcher.getLastNumModifiedFiles() === 0 && + cachedBundle != null && + cachedBundle !== '' + ) { return cachedBundle; } // Clean up the previous bundle URL to not leak memory. - if (cachedBundle) { + if (cachedBundle != null && cachedBundle !== '') { URL.revokeObjectURL(cachedBundle); }