[Pkg-mozext-commits] [greasemonkey] 24/55: Return undefined when GM_getValue is given an invalid key.
David Prévot
taffit at moszumanska.debian.org
Thu Oct 29 15:38:04 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository greasemonkey.
commit 9ba4cb28bd78f261957c3f4348bbf06b12b9ec70
Author: Anthony Lieuallen <arantius at gmail.com>
Date: Wed Sep 23 16:33:54 2015 -0400
Return undefined when GM_getValue is given an invalid key.
Strictly comply with existing docs.
Fixes #2213
---
modules/storageFront.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/storageFront.js b/modules/storageFront.js
index 16d7c96..9101029 100644
--- a/modules/storageFront.js
+++ b/modules/storageFront.js
@@ -61,7 +61,7 @@ GM_ScriptStorageFront.prototype.getValue = function(name, defVal) {
{scriptId: this._script.id, name: name});
value = value.length && value[0];
- if ('undefined' == typeof defVal) defVal = null;
+ if ('undefined' == typeof defVal) defVal = undefined;
if (value === undefined || value === null) return defVal;
try {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/greasemonkey.git
More information about the Pkg-mozext-commits
mailing list