mirror of
https://github.com/pi-hole/web.git
synced 2026-04-26 19:55:15 +01:00
1119 Privacy - Query Page and Dom.storage
be explicit for undefined Signed-off-by: Chris Miceli <chrismiceli@outlook.com>
This commit is contained in:
@@ -239,9 +239,14 @@ function stateSaveCallback(itemName, data) {
|
||||
}
|
||||
|
||||
function stateLoadCallback(itemName) {
|
||||
var data;
|
||||
// Receive previous state from client's local storage area
|
||||
var data =
|
||||
localStorage === null ? backupStorage[itemName] || null : localStorage.getItem(itemName);
|
||||
if (localStorage === null) {
|
||||
var item = backupStorage[itemName];
|
||||
data = typeof item === "undefined" ? null : item;
|
||||
} else {
|
||||
localStorage.getItem(itemName);
|
||||
}
|
||||
|
||||
// Return if not available
|
||||
if (data === null) {
|
||||
|
||||
Reference in New Issue
Block a user