File tree 1 file changed +2
-2
lines changed
packages/devtools-kit/src/core/timeline
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -3,14 +3,14 @@ import { isBrowser } from '@vue/devtools-shared'
3
3
const TIMELINE_LAYERS_STATE_STORAGE_ID = '__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS_STATE__'
4
4
5
5
export function addTimelineLayersStateToStorage ( state : Record < string , boolean | string > ) {
6
- if ( ! isBrowser || typeof localStorage === 'undefined' ) {
6
+ if ( ! isBrowser || typeof localStorage === 'undefined' || localStorage === null ) {
7
7
return
8
8
}
9
9
localStorage . setItem ( TIMELINE_LAYERS_STATE_STORAGE_ID , JSON . stringify ( state ) )
10
10
}
11
11
12
12
export function getTimelineLayersStateFromStorage ( ) {
13
- if ( ! isBrowser || typeof localStorage === 'undefined' ) {
13
+ if ( ! isBrowser || typeof localStorage === 'undefined' || localStorage === null ) {
14
14
return {
15
15
recordingState : false ,
16
16
mouseEventEnabled : false ,
You can’t perform that action at this time.
0 commit comments