fix(editor): Handle localStorage being blocked/unavailable (#7348)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-10-27 15:51:20 +02:00
committed by GitHub
parent 739a4d4ecf
commit c05bc6728d
10 changed files with 69 additions and 45 deletions

View File

@@ -1,3 +1,4 @@
import { useStorage } from '@vueuse/core';
import ChangePasswordView from './views/ChangePasswordView.vue';
import ErrorView from './views/ErrorView.vue';
import ForgotMyPasswordView from './views/ForgotMyPasswordView.vue';
@@ -794,7 +795,7 @@ export const routes = [
role: [ROLE.Owner],
},
deny: {
shouldDeny: () => !window.localStorage.getItem('audit-logs'),
shouldDeny: () => !useStorage('audit-logs', undefined).value,
},
},
},