From 94d0f9553007da8cce5e1a0fe899164cdbf8e99c Mon Sep 17 00:00:00 2001 From: Michal Moskal Date: Mon, 17 Aug 2015 18:50:55 -0700 Subject: [PATCH] keep localStorage tidier --- editor/default.ts | 4 ++-- editor/scriptList.ts | 2 +- rt/util.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/editor/default.ts b/editor/default.ts index 4011fc20..a88c12cc 100644 --- a/editor/default.ts +++ b/editor/default.ts @@ -49,13 +49,13 @@ module TDev if (window.localStorage["lastExceptionMessage"]) { var msg = window.localStorage["lastExceptionMessage"]; - window.localStorage["lastExceptionMessage"] = ""; + window.localStorage.removeItem("lastExceptionMessage"); if (TDev.Browser.EditorSettings.widgets().notifyAppReloaded) upd = div("app-updated", lf("Something went wrong and we reloaded the app")); } if (!upd && window.localStorage["appUpdated"]) { - window.localStorage["appUpdated"] = ""; + window.localStorage.removeItem("appUpdated"); if (dbg) upd = div("app-updated", lf("The TouchDevelop app has been updated.")); } diff --git a/editor/scriptList.ts b/editor/scriptList.ts index d0821159..cf5cb034 100644 --- a/editor/scriptList.ts +++ b/editor/scriptList.ts @@ -260,7 +260,7 @@ this.updateIsWaiting = false; tick(Ticks.appUpdate); window.localStorage["appUpdated"] = "1"; - window.localStorage["lastForcedUpdate"] = ""; + window.localStorage.removeItem("lastForcedUpdate"); window.location.reload(); return true; } diff --git a/rt/util.ts b/rt/util.ts index 4049cfa0..9673d2bc 100644 --- a/rt/util.ts +++ b/rt/util.ts @@ -2650,7 +2650,7 @@ module TDev{ { var b = window.localStorage["storedBug"]; if (b) { - window.localStorage["storedBug"] = ""; + window.localStorage.removeItem("storedBug"); try { sendErrorReport(JSON.parse(b)); } catch (e) {