mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 07:27:58 +01:00
normalise comparisons with undefined
This commit is contained in:
@@ -109,7 +109,7 @@ liberator.Option = function (names, description, type, defaultValue, extraInfo)
|
||||
let tmpValue = newValue;
|
||||
newValue = this.setter.call(this, newValue);
|
||||
|
||||
if (typeof newValue == "undefined")
|
||||
if (newValue === undefined)
|
||||
{
|
||||
newValue = tmpValue;
|
||||
liberator.log("DEPRECATED: '" + this.name + "' setter should return a value");
|
||||
@@ -316,7 +316,7 @@ liberator.Options = function () //{{{
|
||||
}
|
||||
|
||||
var expr = liberator.evalExpression(matches[4]);
|
||||
if (typeof expr == "undefined")
|
||||
if (expr === undefined)
|
||||
{
|
||||
liberator.echoerr("E15: Invalid expression: " + matches[4]);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user