diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2024-12-01 19:58:15 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2024-12-01 19:58:15 -0400 |
commit | 001fbe0975bf5fcce47372cba72b489178fd34e7 (patch) | |
tree | 1e8cac4da76c8c2565a3cdeae241d71e2db1f600 | |
parent | 193672b216dc2edd5fff642ae6689a172be0e9bf (diff) |
language: unflattenLanguageSpec: fix a problem...
very descriptive makes one string unflatten that wasn't appearing before (trackPage.socialEmbed.body.withArtists.withCoverArtists)
-rw-r--r-- | src/data/language.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/data/language.js b/src/data/language.js index f91e123d..99b60d83 100644 --- a/src/data/language.js +++ b/src/data/language.js @@ -72,7 +72,11 @@ export function unflattenLanguageSpec(flat, reference) { const setNestedProp = (obj, key, value) => { const recursive = (o, k) => { if (k.length === 1) { - o[k[0]] = value; + if (typeof o[k[0]] === 'object') { + o[k[0]] = {...o[k[0]], _: value}; + } else { + o[k[0]] = value; + } return; } |