From 1cd87253681074907db8e6751fd787e37b7d17b5 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Tue, 11 Feb 2025 10:20:51 -0400 Subject: data: linkWikiDataArrays: use getNestedProp --- src/data/checks.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/data/checks.js') diff --git a/src/data/checks.js b/src/data/checks.js index 57d0c1a4..74d0d9f9 100644 --- a/src/data/checks.js +++ b/src/data/checks.js @@ -237,7 +237,11 @@ export function filterReferenceErrors(wikiData, { const aggregate = openAggregate({message: `Errors validating between-thing references in data`}); for (const [thingDataProp, propSpec] of referenceSpec) { const thingData = getNestedProp(wikiData, thingDataProp); - const things = Array.isArray(thingData) ? thingData.flat(Infinity) : [thingData]; + const things = + (Array.isArray(thingData) + ? thingData.flat(Infinity) + : [thingData]); + aggregate.nest({message: `Reference errors in ${colors.green('wikiData.' + thingDataProp)}`}, ({nest}) => { for (const thing of things) { nest({message: `Reference errors in ${inspect(thing)}`}, ({nest, push, filter}) => { -- cgit 1.3.0-6-gf8a5