From f9c89c09aec57d7962d8604451c67202ef5edf1d Mon Sep 17 00:00:00 2001 From: Anton Nikolaev Date: Mon, 9 Dec 2019 10:00:12 -0800 Subject: [PATCH] Null ref exception during build on Windows VM Summary: https://pxl.cl/STmd Reviewed By: passy Differential Revision: D18883703 fbshipit-source-id: ff4ee954ee253d46683f162f26c0de734c6acbb3 --- static/compilePlugins.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/static/compilePlugins.js b/static/compilePlugins.js index 1e03a1ed8..86a2d7248 100644 --- a/static/compilePlugins.js +++ b/static/compilePlugins.js @@ -68,7 +68,11 @@ function watchChanges( fs.watch(plugin.rootDir, {recursive: true}, (eventType, filename) => { // only recompile for changes in not hidden files. Watchman might create // a file called .watchman-cookie - if (!filename.startsWith('.') && !delayedCompilation[plugin.name]) { + if ( + filename && + !filename.startsWith('.') && + !delayedCompilation[plugin.name] + ) { delayedCompilation[plugin.name] = setTimeout(() => { delayedCompilation[plugin.name] = null; // eslint-disable-next-line no-console