aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/lib/scripts/cookie.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/scripts/cookie.js')
-rw-r--r--lib/scripts/cookie.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/scripts/cookie.js b/lib/scripts/cookie.js
index 4fb9c25f7..e260e5919 100644
--- a/lib/scripts/cookie.js
+++ b/lib/scripts/cookie.js
@@ -22,8 +22,13 @@ var DokuCookie = {
var text = [],
_this = this;
this.init();
- val = val + "";
- this.data[key] = val;
+ if (val === false){
+ delete this.data[key];
+ }else{
+ val = val + "";
+ this.data[key] = val;
+ }
+
//save the whole data array
jQuery.each(_this.data, function (key, val) {
@@ -42,7 +47,7 @@ var DokuCookie = {
*/
getValue: function(key, def){
this.init();
- return key in this.data ? this.data[key] : def;
+ return this.data.hasOwnProperty(key) ? this.data[key] : def;
},
/**