diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-02-16 08:18:14 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-02-16 08:18:43 -0400 |
commit | f53b01a3e6cf4fe8721e7654e89c0afd2e032f90 (patch) | |
tree | a8898b31af7bae26a84531c7627805488cff328f | |
parent | 5108cf043ebe41de0c62887eaaeb51f0d3d70594 (diff) |
yaml: use boundFind whenever appropriate
-rw-r--r-- | src/data/yaml.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/data/yaml.js b/src/data/yaml.js index fadafbd5..77cab947 100644 --- a/src/data/yaml.js +++ b/src/data/yaml.js @@ -9,7 +9,7 @@ import yaml from 'js-yaml'; import CacheableObject from '#cacheable-object'; import {colors, ENABLE_COLOR, logInfo, logWarn} from '#cli'; -import find, {bindFind, getAllFindSpecs} from '#find'; +import {bindFind, getAllFindSpecs} from '#find'; import Thing from '#thing'; import thingConstructors from '#things'; import {commentaryRegexCaseSensitive, sortByName} from '#wiki-data'; @@ -1240,19 +1240,19 @@ export function filterReferenceErrors(wikiData) { case '_trackNotRerelease': findFn = trackRef => { - const track = find.track(trackRef, wikiData.trackData, {mode: 'error'}); + const track = boundFind.track(trackRef); const originalRef = track && CacheableObject.getUpdateValue(track, 'originalReleaseTrack'); if (originalRef) { // It's possible for the original to not actually exist, in this case. // It should still be reported since the 'Originally Released As' field // was present. - const original = find.track(originalRef, wikiData.trackData, {mode: 'quiet'}); + const original = boundFind.track(originalRef, {mode: 'quiet'}); // Prefer references by name, but only if it's unambiguous. const originalByName = (original - ? find.track(original.name, wikiData.trackData, {mode: 'quiet'}) + ? boundFind.track(original.name, {mode: 'quiet'}) : null); const shouldBeMessage = |