Skip to content

Commit

Permalink
fix: Error on raw type variables; Resolves #55
Browse files Browse the repository at this point in the history
  • Loading branch information
PRO-2684 committed Dec 25, 2024
1 parent 88d4394 commit bb74492
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions modules/main/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,6 @@ function processVar(value) {
}
const varData = { type: varType, label: varLabel, name: varName, value: null, default: null, options: null };
switch (varType) {
case "text":
case "color":
case "colour":
varData.default = varArgs[0];
break;
case "number":
case "range":
case "percent":
Expand Down Expand Up @@ -128,6 +123,9 @@ function processVar(value) {
});
break;
}
default: // text, color, colour, raw
varData.default = varArgs[0];
break;
}
return [varName, varData];
} else {
Expand Down
2 changes: 1 addition & 1 deletion modules/renderer/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ function addVarInput(varItem, varObj) {
break;
}
default:
// text
// text, raw
varInput = document.createElement("input");
varInput.type = "text";
varInput.title = `默认值: ${defaultValue}`;
Expand Down

0 comments on commit bb74492

Please sign in to comment.