From 1207cdd1055ce7b25d53c36f5eec8f91a1e8239c Mon Sep 17 00:00:00 2001 From: borissedw Date: Wed, 9 Aug 2023 16:46:07 +0300 Subject: [PATCH] 0.0.93 --- static/js/global_js.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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_; }