From f35c4cf5e4ba15b88d84ebbf90d000eca5bf2976 Mon Sep 17 00:00:00 2001 From: Artsiom Aliakseyenka Date: Mon, 1 Apr 2019 12:46:24 +0300 Subject: [PATCH] fix: check both static list and remote list before raising error --- src/pass.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pass.js b/src/pass.js index 8588b55..af29480 100644 --- a/src/pass.js +++ b/src/pass.js @@ -107,8 +107,9 @@ class Pass { .then(([modelFileList, remoteFilesList, remoteBuffers]) => { // list without dynamic components like manifest, signature or pass files (will be added later in the flow) and hidden files. let noDynList = removeHidden(modelFileList).filter(f => !/(manifest|signature|pass)/i.test(f)); + const hasAssets = noDynList.length || remoteFilesList.length; - if (!noDynList.length || ![...noDynList, ...remoteFilesList].some(f => f.toLowerCase().includes("icon"))) { + if (!hasAssets || ![...noDynList, ...remoteFilesList].some(f => f.toLowerCase().includes("icon"))) { let eMessage = formatMessage("MODEL_UNINITIALIZED", path.parse(this.model).name); throw new Error(eMessage); }