mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 16:25:21 +00:00
fix: check both static list and remote list before raising error
This commit is contained in:
committed by
Alexander Cerutti
parent
98c4d47f48
commit
f35c4cf5e4
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user