« get me outta code hell

infra: don't whine about newly created dependency files - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-06-24 11:48:54 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-06-24 11:48:54 -0300
commitfc3e3ab37e3433b7533de52eccfc7ee1f2d6445d (patch)
tree86eac63f634af801e902b1c4c13331b795b27c40 /src
parent63c60d09afd7f0b697e4931c5d6cfbfef39021f3 (diff)
infra: don't whine about newly created dependency files
Diffstat (limited to 'src')
-rw-r--r--src/content/dependencies/index.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/content/dependencies/index.js b/src/content/dependencies/index.js
index f7a0a65..36cd27f 100644
--- a/src/content/dependencies/index.js
+++ b/src/content/dependencies/index.js
@@ -167,6 +167,13 @@ export function watchContentDependencies({
         break main;
       }
 
+      // Just skip newly created files. They'll be processed again when
+      // written.
+      if (spec === undefined) {
+        contentDependencies[functionName] = null;
+        return;
+      }
+
       let fn;
       try {
         fn = processFunctionSpec(functionName, spec);