diff --git a/static/js/global_js.js b/static/js/global_js.js index 71ddb13..16ad226 100644 --- a/static/js/global_js.js +++ b/static/js/global_js.js @@ -8,8 +8,14 @@ function getNewMessageSession (){ for(var i = 0;i < o.length;i++){ r[o[i].split("=")[0]] = o[i].split("=")[1]; } - let prs = JSON.parse(r['user_alerts']) - let prs_ = JSON.parse(prs) + let prs_ = null + if (r['user_alerts']){ + let prs = JSON.parse(r['user_alerts']) + prs_ = JSON.parse(prs) + } else { + // + } + // if (prs === "{'new_message': True}"){ // prs = { // 'new_message' : 'True' @@ -20,6 +26,7 @@ function getNewMessageSession (){ // } // } // b = cookieS + // let b = CookieStore.getAll() return prs_; }