diff --git a/RestoolsBBWatchReloaded.js b/RestoolsBBWatchReloaded.js index 9e61ce9..eb5ca30 100644 --- a/RestoolsBBWatchReloaded.js +++ b/RestoolsBBWatchReloaded.js @@ -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;