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 langFolderIdentifier = `${lang}.lproj`;
for (
let i = allFilesKeys.length, filePath: string;
(filePath = allFilesKeys[--i]);
for (let i = allFilesKeys.length - 1; i >= 0; i--) {
const filePath = allFilesKeys[i];
) {
if (filePath.startsWith(langFolderIdentifier)) {
delete this[filesSymbol][filePath];
}