diff options
Diffstat (limited to 'src/data/language.js')
-rw-r--r-- | src/data/language.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/data/language.js b/src/data/language.js index a149e19f..f91e123d 100644 --- a/src/data/language.js +++ b/src/data/language.js @@ -110,6 +110,12 @@ 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])); |