« 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/checks.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/data/checks.js')
-rw-r--r--src/data/checks.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/data/checks.js b/src/data/checks.js
index 5688b979..b7a237ad 100644
--- a/src/data/checks.js
+++ b/src/data/checks.js
@@ -350,6 +350,17 @@ export function filterReferenceErrors(wikiData, {
                 findFn = ref => {
                   // Mocking what's going on in `withMainRelease`.
 
+                  if (ref === 'same name single') {
+                    // Accessing the current thing here.
+                    try {
+                      return boundFind.albumSinglesOnly(thing.name);
+                    } catch (caughtError) {
+                      throw new Error(
+                        `Didn't match a single with the same name`,
+                        {cause: caughtError});
+                    }
+                  }
+
                   let track, trackError;
                   let album, albumError;