aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjanus_wel2008-11-15 09:23:31 +0000
committerjanus_wel2008-11-15 09:23:31 +0000
commitf8ba631ea9b8efef12e0f6f667af484cc957876d (patch)
treea920b42b13daf235ca2153d7b3da2d401833678e
parent05b1a6073537ceaf7248ea720f85a472248c5f22 (diff)
downloadvimperator-plugins-f8ba631ea9b8efef12e0f6f667af484cc957876d.tar.bz2
bugfix: not work if cookie is nonexistent on the site.
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@23784 d0d07461-0603-4401-acd4-de1884942a52
-rw-r--r--cookie.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/cookie.js b/cookie.js
index 9ff8c0a..6cdbf3c 100644
--- a/cookie.js
+++ b/cookie.js
@@ -68,6 +68,8 @@ CookieManager.prototype = {
},
_deserializeCookie: function (cookieString) {
+ if (!cookieString) return {};
+
let cookies = cookieString.split(/; */);
let cookie = {};
let key, val;
@@ -108,6 +110,7 @@ liberator.modules.buffer.addPageInfoSection(
yield [p, c.getCookie(p)];
}
}
+ return;
}
);