From c92691d68ed10b64a8d79ac40a003ada92e16e9b Mon Sep 17 00:00:00 2001 From: Zach Aries Date: Fri, 3 May 2019 10:07:58 -0600 Subject: [PATCH] fix: await for _remoteResources.reduce to resolve --- src/pass.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pass.js b/src/pass.js index 82c3d6a..164a086 100644 --- a/src/pass.js +++ b/src/pass.js @@ -68,7 +68,7 @@ class Pass { * Getting the buffers for remote files */ - const buffersPromise = this._remoteResources.reduce(async (acc, current) => { + const buffersPromise = await this._remoteResources.reduce(async (acc, current) => { try { const response = await got(current[0], { encoding: null }); loadDebug(formatMessage("LOAD_MIME", response.headers["content-type"])); @@ -100,7 +100,7 @@ class Pass { } // list without localization files (they will be added later in the flow) - const bundle = noDynList.filter(f => !f.includes(".lproj")); + let bundle = noDynList.filter(f => !f.includes(".lproj")); // Localization folders only const L10N = noDynList.filter(f => f.includes(".lproj") && Object.keys(this.l10n).includes(path.parse(f).name));