mirror of
https://github.com/NovaGM/ModuleBuilder.git
synced 2024-08-15 00:23:33 +00:00
[*Theme] ColorPalette: Add no val abort
This commit is contained in:
parent
79db05e7dc
commit
7762d0bd07
1 changed files with 13 additions and 1 deletions
|
@ -115,8 +115,20 @@ export default async (manifest, _content, repo) => {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let abortNoVal = false;
|
||||||
|
|
||||||
while (v[1].startsWith('var(')) {
|
while (v[1].startsWith('var(')) {
|
||||||
v[1] = variables.find((y) => y[0] === v[1].slice(4, -1))[1];
|
v[1] = variables.find((y) => y[0] === v[1].slice(4, -1))?.[1];
|
||||||
|
|
||||||
|
if (!v[1]) {
|
||||||
|
abortNoVal = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (abortNoVal) {
|
||||||
|
console.log('aborting color palette image, could not find var substitute', wanted);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
imagePalette.push([v[0], v[1]]);
|
imagePalette.push([v[0], v[1]]);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue