diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-12-28 17:11:16 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-12-28 17:33:48 -0400 |
commit | e673e1d6983f05885cbc596e2fc19fa5d0f302ac (patch) | |
tree | 6aba2dedb461c58527a1a49ed3d7bf424cef820d | |
parent | a8c4cbf7d0913ea3ac9086ada8b9042608f604e2 (diff) |
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
-rw-r--r-- | src/data/yaml.js | 9 |
1 files changed, 4 insertions, 5 deletions
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]; |