From e673e1d6983f05885cbc596e2fc19fa5d0f302ac Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Thu, 28 Dec 2023 17:11:16 -0400 Subject: data: miscellaneous linkWikiDataArrays fixes Squashed from: * data: fix misplaced return instead of yaml in linkWikiDataArrays * data: more linkWikiDataArrays tolerance * data: get rid of accidental .slice() in linkWikiDataArrays --- src/data/yaml.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/data/yaml.js') diff --git a/src/data/yaml.js b/src/data/yaml.js index c79ce53b..f2540b65 100644 --- a/src/data/yaml.js +++ b/src/data/yaml.js @@ -1594,11 +1594,10 @@ export function linkWikiDataArrays(wikiData, { ]); for (const [things, keys] of linkWikiDataSpec.entries()) { - if (things === undefined) return; - for (let i = 0; i < things.length; i++) { - const thing = things[i]; - for (let j = 0; j < keys.length; j++) { - const key = keys[j]; + if (things === undefined) continue; + for (const thing of things) { + if (thing === undefined) continue; + for (const key of keys) { if (!(key in wikiData)) continue; if (XXX_decacheWikiData) thing[key] = []; thing[key] = wikiData[key]; -- cgit 1.3.0-6-gf8a5