Optimized localize null-translations loop

This commit is contained in:
Alexander Cerutti
2022-03-13 00:19:50 +01:00
parent 1212f4b32b
commit 951730fb1d

View File

@@ -743,11 +743,9 @@ export default class PKPass extends Bundle {
const allFilesKeys = Object.keys(this[filesSymbol]); const allFilesKeys = Object.keys(this[filesSymbol]);
const langFolderIdentifier = `${lang}.lproj`; const langFolderIdentifier = `${lang}.lproj`;
for ( for (let i = allFilesKeys.length - 1; i >= 0; i--) {
let i = allFilesKeys.length, filePath: string; const filePath = allFilesKeys[i];
(filePath = allFilesKeys[--i]);
) {
if (filePath.startsWith(langFolderIdentifier)) { if (filePath.startsWith(langFolderIdentifier)) {
delete this[filesSymbol][filePath]; delete this[filesSymbol][filePath];
} }