« get me outta code hell

data: Thing.composite.from: fix including '#' deps from base - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data/things
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2023-08-30 15:56:04 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-09-05 21:02:53 -0300
commit3336d5f15e29350656273a37c0a1c7a69d24663b (patch)
treea04462efc9a3a13ac43e65deff28e4fb11c545bf /src/data/things
parent895712f5a0381c41557c6d306d6697019368bb7b (diff)
data: Thing.composite.from: fix including '#' deps from base
...in the final composition's dependencies.
Diffstat (limited to 'src/data/things')
-rw-r--r--src/data/things/thing.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/data/things/thing.js b/src/data/things/thing.js
index 4fd6a26a..25d8c8a3 100644
--- a/src/data/things/thing.js
+++ b/src/data/things/thing.js
@@ -756,7 +756,14 @@ export default class Thing extends CacheableObject {
       }
 
       const exposeSteps = [];
-      const exposeDependencies = new Set(base.expose?.dependencies);
+      const exposeDependencies = new Set();
+
+      if (base.expose?.dependencies) {
+        for (const dependency of base.expose.dependencies) {
+          if (typeof dependency === 'string' && dependency.startsWith('#')) continue;
+          exposeDependencies.add(dependency);
+        }
+      }
 
       if (base.expose?.mapDependencies) {
         for (const dependency of Object.values(base.expose.mapDependencies)) {