Skip to content

Commit 7b06f6b

Browse files
committed
prevent possible unhandled rejection
1 parent 358e5d6 commit 7b06f6b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,13 +284,13 @@ export default class I18nextPlugin {
284284
}));
285285
}));
286286
// remove previous missings
287-
await Promise.all(_.map(remains, async (namespaces, lng) =>
288-
_.map(namespaces, async (__, ns) => {
287+
await Promise.all(_.map(remains, (namespaces, lng) =>
288+
Promise.all(_.map(namespaces, async (__, ns) => {
289289
const missingPath = path.resolve(this.context, getPath(this.option.pathToSaveMissing, lng, ns));
290290
if (await exists(missingPath)) {
291291
await unlink(missingPath);
292292
}
293-
})
293+
}))
294294
));
295295
callback();
296296
} catch (e) {

0 commit comments

Comments
 (0)