From 6c6c084b84ea22a5528b3ee4a7242e5a18c5863a Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sun, 1 Dec 2024 20:01:00 -0400 Subject: language: unflattenLanguageSpec: simplify {_: ...} tidying cleaner solution than "no lonely '_' keys" --- src/data/language.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/data/language.js') diff --git a/src/data/language.js b/src/data/language.js index 99b60d83..47caa1ed 100644 --- a/src/data/language.js +++ b/src/data/language.js @@ -114,12 +114,6 @@ export function unflattenLanguageSpec(flat, reference) { return {[firstKey]: result}; } - const resultKeys = Object.keys(result); - if (resultKeys.length === 1 && resultKeys[0] === '_') { - delete ownNode[firstKey]; - return {[firstKey]: result._}; - } - if (refKeys.length > 1) { return withEntries(result, entries => entries.map(([key, value]) => [`${firstKey}.${key}`, value])); @@ -153,7 +147,7 @@ export function unflattenLanguageSpec(flat, reference) { typeof refNode === 'object' && typeof refNode._ === 'string' ) { - return {_: ownNode}; + return ownNode; } if ( -- cgit 1.3.0-6-gf8a5