1119 Privacy - Query Page and Dom.storage

handle localStorage being null

Signed-off-by: Chris Miceli <chrismiceli@outlook.com>
This commit is contained in:
Chris Miceli
2021-12-24 22:32:01 -06:00
parent cca2f78c10
commit 99c718296a
5 changed files with 21 additions and 12 deletions

View File

@@ -231,7 +231,7 @@ $(function () {
fieldtext += '<input type="hidden" name="id" value="' + parseInt(data[4], 10) + '">';
$(row).addClass(blocked === true ? "blocked-row" : "allowed-row");
if (localStorage.getItem("colorfulQueryLog_chkbox") === "true") {
if (localStorage && localStorage.getItem("colorfulQueryLog_chkbox") === "true") {
$(row).addClass(blocked === true ? "text-red" : "text-green");
}