From: Pascal Mugnier Date: Fri, 13 Apr 2018 05:44:08 +0000 (+0200) Subject: Revert "SONAR-10564 Exception when opening rule description in Google Chrome" X-Git-Tag: 6.7.4~17 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=080f8a2e78f90b21406e9ef35eefd482ede17773;p=sonarqube.git Revert "SONAR-10564 Exception when opening rule description in Google Chrome" This reverts commit 4676d0dfd9d3c629e9a4a926001632bcbe2066e8. --- diff --git a/server/sonar-web/src/main/js/app/components/RecentHistory.js b/server/sonar-web/src/main/js/app/components/RecentHistory.js index 23e4ff59f20..1bc7d308621 100644 --- a/server/sonar-web/src/main/js/app/components/RecentHistory.js +++ b/server/sonar-web/src/main/js/app/components/RecentHistory.js @@ -51,21 +51,13 @@ export default class RecentHistory { static set(newHistory /*: History */) /*: void */ { if (window.localStorage) { - try { - window.localStorage.setItem(STORAGE_KEY, JSON.stringify(newHistory)); - } catch (e) { - /* Fail silently*/ - } + window.localStorage.setItem(STORAGE_KEY, JSON.stringify(newHistory)); } } static clear() /*: void */ { if (window.localStorage) { - try { - window.localStorage.removeItem(STORAGE_KEY); - } catch (e) { - /* Fail silently*/ - } + window.localStorage.removeItem(STORAGE_KEY); } } diff --git a/server/sonar-web/src/main/js/components/workspace/models/items.js b/server/sonar-web/src/main/js/components/workspace/models/items.js index d619d8d72ff..655b836da8b 100644 --- a/server/sonar-web/src/main/js/components/workspace/models/items.js +++ b/server/sonar-web/src/main/js/components/workspace/models/items.js @@ -31,11 +31,7 @@ export default Backbone.Collection.extend({ save() { const dump = JSON.stringify(this.toJSON()); - try { - window.localStorage.setItem(STORAGE_KEY, dump); - } catch (e) { - /* Fail silently*/ - } + window.localStorage.setItem(STORAGE_KEY, dump); }, load() {