« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
-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);