Move localStorageUsable initialization

parent 3f4997fb
...@@ -24,7 +24,6 @@ export default { ...@@ -24,7 +24,6 @@ export default {
}, },
data() { data() {
return { return {
localStorageUsable: AccessorUtilities.isLocalStorageAccessSafe(),
isVisible: true, isVisible: true,
}; };
}, },
...@@ -49,6 +48,7 @@ export default { ...@@ -49,6 +48,7 @@ export default {
}, },
}, },
created() { created() {
this.localStorageUsable = AccessorUtilities.isLocalStorageAccessSafe();
if (this.localStorageUsable) { if (this.localStorageUsable) {
const shouldHideSummaryDetails = Boolean(localStorage.getItem(LOCAL_STORAGE_KEY)); const shouldHideSummaryDetails = Boolean(localStorage.getItem(LOCAL_STORAGE_KEY));
this.isVisible = !shouldHideSummaryDetails; this.isVisible = !shouldHideSummaryDetails;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment