From 6dcee5a1f823a06fc26594f2c5faacca153b5c2d Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 26 Mar 2013 10:45:29 +0530 Subject: [PATCH] fixes in website utils --- public/js/website_utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/website_utils.js b/public/js/website_utils.js index a33eee04ba..d1b5ab7f20 100644 --- a/public/js/website_utils.js +++ b/public/js/website_utils.js @@ -127,7 +127,7 @@ function getCookies() { var parts = cookie.split(/=/, 2), name = decodeURIComponent(parts[0].trimLeft()), value = parts.length > 1 ? decodeURIComponent(parts[1].trimRight()) : null; - if(value.charAt(0)==='"') { + if(value && value.charAt(0)==='"') { value = value.substr(1, value.length-2); } cookies[name] = value;