mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-13 09:50:43 -05:00
Reduced nesting
This commit is contained in:
parent
fc7b33cd53
commit
2e4f15d5a8
@ -124,9 +124,10 @@ export class ImporterUtil {
|
|||||||
|
|
||||||
while (filesToProcess.length !== 0) {
|
while (filesToProcess.length !== 0) {
|
||||||
const fileNode = filesToProcess.dequeue();
|
const fileNode = filesToProcess.dequeue();
|
||||||
if (!fileNode) continue;
|
if (!fileNode || this.vfs.getFileExtension(fileNode.fileName) !== "json") {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.vfs.getFileExtension(fileNode.fileName) === "json") {
|
|
||||||
const filePathAndName = `${fileNode.filePath}${fileNode.fileName}`;
|
const filePathAndName = `${fileNode.filePath}${fileNode.fileName}`;
|
||||||
promises.push(
|
promises.push(
|
||||||
this.vfs
|
this.vfs
|
||||||
@ -143,7 +144,6 @@ export class ImporterUtil {
|
|||||||
.then(() => progressWriter.increment()),
|
.then(() => progressWriter.increment()),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
await Promise.all(promises).catch((e) => console.error(e));
|
await Promise.all(promises).catch((e) => console.error(e));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user