mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 19:25:23 +00:00
Merge pull request #5 from jennysharps/issue-4/model-validation
Fix model initialization validation
This commit is contained in:
@@ -103,8 +103,7 @@ class Pass {
|
|||||||
// list without dynamic components like manifest, signature or pass files (will be added later in the flow) and hidden files.
|
// 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));
|
let noDynList = removeHidden(modelFileList).filter(f => !/(manifest|signature|pass)/i.test(f));
|
||||||
|
|
||||||
if (!noDynList.length || !noDynList.some(f => f.toLowerCase().includes("icon"))
|
if (!noDynList.length || ![...noDynList, ...remoteFilesList].some(f => f.toLowerCase().includes("icon"))) {
|
||||||
|| !remoteFilesList.some(f => f.toLowerCase().includes("icon"))) {
|
|
||||||
let eMessage = formatError("MODEL_UNINITIALIZED", path.parse(this.model).name);
|
let eMessage = formatError("MODEL_UNINITIALIZED", path.parse(this.model).name);
|
||||||
throw new Error(eMessage);
|
throw new Error(eMessage);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user