Merge pull request #5 from jennysharps/issue-4/model-validation

Fix model initialization validation
This commit is contained in:
Alexander Cerutti
2018-12-05 14:29:11 +01:00
committed by GitHub

View File

@@ -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.
let noDynList = removeHidden(modelFileList).filter(f => !/(manifest|signature|pass)/i.test(f));
if (!noDynList.length || !noDynList.some(f => f.toLowerCase().includes("icon"))
|| !remoteFilesList.some(f => f.toLowerCase().includes("icon"))) {
if (!noDynList.length || ![...noDynList, ...remoteFilesList].some(f => f.toLowerCase().includes("icon"))) {
let eMessage = formatError("MODEL_UNINITIALIZED", path.parse(this.model).name);
throw new Error(eMessage);
}