From 41fceb1ce1af3ac50e18f5154e371d9942a6f9e7 Mon Sep 17 00:00:00 2001 From: Skriv <skrivelese@gmail.com> Date: Thu, 16 May 2019 22:05:36 +0200 Subject: [PATCH] re-fix yoda problem --- src/js/colorinput.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/colorinput.js b/src/js/colorinput.js index bf0604cbb83..0bd884a15bf 100644 --- a/src/js/colorinput.js +++ b/src/js/colorinput.js @@ -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 }); -- GitLab