We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
localStorage
1 parent dbd0eed commit 0573f68Copy full SHA for 0573f68
packages/devtools-kit/src/core/timeline/storage.ts
@@ -3,14 +3,14 @@ import { isBrowser } from '@vue/devtools-shared'
3
const TIMELINE_LAYERS_STATE_STORAGE_ID = '__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS_STATE__'
4
5
export function addTimelineLayersStateToStorage(state: Record<string, boolean | string>) {
6
- if (!isBrowser) {
+ if (!isBrowser || typeof localStorage === 'undefined') {
7
return
8
}
9
localStorage.setItem(TIMELINE_LAYERS_STATE_STORAGE_ID, JSON.stringify(state))
10
11
12
export function getTimelineLayersStateFromStorage() {
13
14
return {
15
recordingState: false,
16
mouseEventEnabled: false,
0 commit comments