diff options
author | Phy <git@phy25.com> | 2019-03-12 07:59:21 -0400 |
---|---|---|
committer | Phy <git@phy25.com> | 2019-03-12 07:59:21 -0400 |
commit | 40be5e7a38c9cf92c115534a77437c3fda53379e (patch) | |
tree | 86729eebc993f6dcaa70dc9fb5672590ab6d09ae /lib/scripts/cookie.js | |
parent | 1c3eca7df004684433dd29bac9360bddd6f809a0 (diff) | |
download | dokuwiki-40be5e7a38c9cf92c115534a77437c3fda53379e.tar.gz dokuwiki-40be5e7a38c9cf92c115534a77437c3fda53379e.zip |
cookie.js convert value type to string
This prevents different type returned for DokuCookie.getValue():
DokuCookie.setValue('foo', false);
console.log(DokuCookie.getValue('foo')); // false
location.reload(); // pseudo code
console.log(DokuCookie.getValue('foo')); // 'false'
Diffstat (limited to 'lib/scripts/cookie.js')
-rw-r--r-- | lib/scripts/cookie.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/scripts/cookie.js b/lib/scripts/cookie.js index 8417d2064..a8e90fea5 100644 --- a/lib/scripts/cookie.js +++ b/lib/scripts/cookie.js @@ -22,6 +22,7 @@ var DokuCookie = { var text = [], _this = this; this.init(); + val = val + ""; this.data[key] = val; //save the whole data array |