From 7d2605456c2961a3a92b1c1041770d6300ef149c Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Tue, 1 Feb 2011 18:28:06 +1100 Subject: [PATCH] Update some old references to the deprecated dactyl.globalVariables. Prefer set.has over Object#hasOwnProperty in :let/:unlet definitions. --- common/content/options.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/content/options.js b/common/content/options.js index f92d3106..92bb4244 100644 --- a/common/content/options.js +++ b/common/content/options.js @@ -1094,7 +1094,7 @@ var Options = Module("options", { dactyl.assert(scope == "g:" || scope == null, "E461: Illegal variable name: " + scope + name); - dactyl.assert(globalVariables.hasOwnProperty(name) || (expr && !op), + dactyl.assert(set.has(globalVariables, name) || (expr && !op), "E121: Undefined variable: " + fullName); if (!expr) @@ -1192,13 +1192,13 @@ var Options = Module("options", { function (args) { for (let [, name] in args) { name = name.replace(/^g:/, ""); // throw away the scope prefix - if (!dactyl.globalVariables.hasOwnProperty(name)) { + if (!set.has(dactyl._globalVariables, name)) { if (!args.bang) dactyl.echoerr("E108: No such variable: " + name); return; } - delete dactyl.globalVariables[name]; + delete dactyl._globalVariables[name]; } }, {