« get me outta code hell

data: use continuation.exit and continuation.raise where needed - 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:
author(quasar) nebula <qznebula@protonmail.com>2023-08-25 13:28:56 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-09-05 21:02:51 -0300
commitfe9bd87d1e6b71c3019b38ca2f99e0c21d916186 (patch)
treebb5ea9551a8e5fb445f15074b67828c91dce0671 /src/data
parent2a87cbaf06e364585bae2b48919c46b6d1f7aa1f (diff)
data: use continuation.exit and continuation.raise where needed
Diffstat (limited to 'src/data')
-rw-r--r--src/data/things/thing.js2
-rw-r--r--src/data/things/track.js6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/data/things/thing.js b/src/data/things/thing.js
index 16dd786d..578a5a4e 100644
--- a/src/data/things/thing.js
+++ b/src/data/things/thing.js
@@ -1187,7 +1187,7 @@ export default class Thing extends CacheableObject {
                 return continuation.exit(null);
               }
 
-              return continuation({match});
+              return continuation.raise({match});
             },
           },
         },
diff --git a/src/data/things/track.js b/src/data/things/track.js
index 23b6da56..5c3a1d46 100644
--- a/src/data/things/track.js
+++ b/src/data/things/track.js
@@ -454,12 +454,12 @@ export class Track extends Thing {
             dependencies: ['#originalRelease'],
 
             compute({'#originalRelease': originalRelease}, continuation) {
-              if (!originalRelease) return continuation();
+              if (!originalRelease) return continuation.raise();
 
               const value = originalRelease[originalProperty];
-              if (allowOverride && value === null) return continuation();
+              if (allowOverride && value === null) return continuation.raise();
 
-              return value;
+              return continuation.exit(value);
             },
           },
         }