Improved names and fixed issue with loop

This commit is contained in:
Alexander Cerutti
2021-06-21 22:14:59 +02:00
parent 27f032c3fe
commit 0f6088f9c4

View File

@@ -220,26 +220,21 @@ export class Pass {
* it otherwise. * it otherwise.
*/ */
if (!this.l10nBundles[languageBundleDirname]) { const languageBundleUnit = (this.l10nBundles[
this.l10nBundles[languageBundleDirname] = {}; languageBundleDirname
} ] ??= {});
this.l10nBundles[languageBundleDirname]["pass.strings"] = languageBundleUnit["pass.strings"] = Buffer.concat([
Buffer.concat([ languageBundleUnit["pass.strings"] || Buffer.alloc(0),
this.l10nBundles[languageBundleDirname][
"pass.strings"
] || Buffer.alloc(0),
strings, strings,
]); ]);
} }
if ( if (
!( !this.l10nBundles[languageBundleDirname] ||
this.l10nBundles[languageBundleDirname] && !Object.keys(this.l10nBundles[languageBundleDirname]).length
Object.keys(this.l10nBundles[languageBundleDirname]).length
)
) { ) {
return; continue;
} }
/** /**