« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/data/things/thing.js20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/data/things/thing.js b/src/data/things/thing.js
index 25d8c8a3..6bdc897f 100644
--- a/src/data/things/thing.js
+++ b/src/data/things/thing.js
@@ -1325,15 +1325,21 @@ export default class Thing extends CacheableObject {
           flags: {expose: true, compose: true},
           expose: {
             dependencies: ['#availability'],
+            compute: ({'#availability': availability}, continuation) =>
+              (availability
+                ? continuation.raise()
+                : continuation()),
+          },
+        },
+
+        {
+          flags: {expose: true, compose: true},
+          expose: {
+            dependencies: ['#availability'],
             options: {value},
 
-            compute: ({
-              '#availability': availability,
-              '#options': {value},
-            }, continuation) =>
-              (availability
-                ? continuation()
-                : continuation.exit(value)),
+            compute: ({'#options': {value}}, continuation) =>
+              continuation.exit(value),
           },
         },
       ]),