Fixed loading after reset

This commit is contained in:
2023-06-15 18:29:47 +02:00
parent ca6e5a485f
commit 05b76cec5c

View File

@@ -1,7 +1,7 @@
// ==UserScript==
// @name IITC plugin: ResTools BB Watch Reloaded
// @namespace https://git.martinvylet.cz/vykend/ResTools-BB-Watch-Reloaded
// @version 0.5.1
// @version 0.5.2
// @description Scan window for BBs on ornamented portals, then check results
// @author vikend
// @icon
@@ -260,7 +260,12 @@ function wrapper(plugin_info)
window.plugin.restoolsBBWatchReloaded.loadStorage = function() {
if (localStorage[window.plugin.restoolsBBWatchReloaded.BB_STORAGE] != undefined) {
return JSON.parse(localStorage[window.plugin.restoolsBBWatchReloaded.BB_STORAGE]);
if (JSON.parse(localStorage[window.plugin.restoolsBBWatchReloaded.BB_STORAGE]) != null) {
return JSON.parse(localStorage[window.plugin.restoolsBBWatchReloaded.BB_STORAGE]);
}
else {
return window.plugin.restoolsBBWatchReloaded.WAVE_PORTALS;
}
}
else {
return window.plugin.restoolsBBWatchReloaded.WAVE_PORTALS;