« 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/cacheable-object.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/data/cacheable-object.js')
-rw-r--r--src/data/cacheable-object.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/data/cacheable-object.js b/src/data/cacheable-object.js
index addc225b..5e26c5f2 100644
--- a/src/data/cacheable-object.js
+++ b/src/data/cacheable-object.js
@@ -255,7 +255,8 @@ export default class CacheableObject {
 
     if (expose.dependencies?.length > 0) {
       const dependencyKeys = expose.dependencies.slice();
-      const shouldReflect = dependencyKeys.includes('this');
+      const shouldReflectObject = dependencyKeys.includes('this');
+      const shouldReflectProperty = dependencyKeys.includes('thisProperty');
 
       getAllDependencies = () => {
         const dependencies = Object.create(null);
@@ -264,10 +265,14 @@ export default class CacheableObject {
           dependencies[key] = this.#propertyUpdateValues[key];
         }
 
-        if (shouldReflect) {
+        if (shouldReflectObject) {
           dependencies.this = this;
         }
 
+        if (shouldReflectProperty) {
+          dependencies.thisProperty = property;
+        }
+
         return dependencies;
       };
     } else {