diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-10-08 12:43:00 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-10-10 09:41:13 -0300 |
commit | 1407db7b8d745c22e40e904862d1b1562fe59f1b (patch) | |
tree | bb9336bcd7a365f4e94fad8f24419444f76141ad /src/content/dependencies | |
parent | 431014efacf8bf24b58a21180e71e0db865f30fe (diff) |
infra: tweak how empty content function modules are handled
Diffstat (limited to 'src/content/dependencies')
-rw-r--r-- | src/content/dependencies/index.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/content/dependencies/index.js b/src/content/dependencies/index.js index 71802050..58bac0d2 100644 --- a/src/content/dependencies/index.js +++ b/src/content/dependencies/index.js @@ -177,7 +177,14 @@ export function watchContentDependencies({ // Just skip newly created files. They'll be processed again when // written. if (spec === undefined) { - contentDependencies[functionName] = null; + // For practical purposes the file is treated as though it doesn't + // even exist (undefined), rather than not being ready yet (null). + // Apart from if existing contents of the file were erased (but not + // the file itself), this value might already be set (to null!) by + // the readdir performed at the beginning to evaluate which files + // should be read and processed at least once before reporting all + // dependencies as ready. + delete contentDependencies[functionName]; return; } |