« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data
diff options
context:
space:
mode:
Diffstat (limited to 'src/data')
-rw-r--r--src/data/yaml.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/data/yaml.js b/src/data/yaml.js
index ee65eb7f..69069d66 100644
--- a/src/data/yaml.js
+++ b/src/data/yaml.js
@@ -695,10 +695,17 @@ export function getAllDataSteps() {
 
   const steps = [];
 
+  const seenLoadingFns = new Set();
+
   for (const thingConstructor of Object.values(thingConstructors)) {
     const getSpecFn = thingConstructor[Thing.getYamlLoadingSpec];
     if (!getSpecFn) continue;
 
+    // Subclasses can expose literally the same static properties
+    // by inheritence. We don't want to double-count those!
+    if (seenLoadingFns.has(getSpecFn)) continue;
+    seenLoadingFns.add(getSpecFn);
+
     steps.push(getSpecFn({
       documentModes,
       thingConstructors,