Skip to content
Snippets Groups Projects
Commit 41fceb1c authored by Skriv's avatar Skriv
Browse files

re-fix yoda problem

parent 6a82b294
No related branches found
No related tags found
No related merge requests found
......@@ -4,9 +4,9 @@ Macro.add("colorinput", {
let e = [];
return this.args.length < 1 && e.push("variable name"), this.args.length < 2 && e.push("default value"), this.error("no " + e.join(" or ") + " specified");
}
if ("string" !== typeof this.args[0]) { return this.error("variable name argument is not a string"); }
if (typeof this.args[0] !== "string") { return this.error("variable name argument is not a string"); }
let varName = this.args[0].trim();
if ("$" !== varName[0] && "_" !== varName[0]) { return this.error('variable name "' + this.args[0] + '" is missing its sigil ($ or _)'); }
if (varName[0] !== "$" && varName[0] !== "_") { return this.error('variable name "' + this.args[0] + '" is missing its sigil ($ or _)'); }
Config.debug && this.debugView.modes({
block: true
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment