From f53b01a3e6cf4fe8721e7654e89c0afd2e032f90 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Fri, 16 Feb 2024 08:18:14 -0400 Subject: yaml: use boundFind whenever appropriate --- src/data/yaml.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/data/yaml.js') diff --git a/src/data/yaml.js b/src/data/yaml.js index fadafbd..77cab94 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 = -- cgit 1.3.0-6-gf8a5