File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
packages/devtools-kit/src/core/timeline Expand file tree Collapse file tree 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'
33const TIMELINE_LAYERS_STATE_STORAGE_ID = '__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS_STATE__'
44
55export function addTimelineLayersStateToStorage ( state : Record < string , boolean | string > ) {
6- if ( ! isBrowser || typeof localStorage === 'undefined' ) {
6+ if ( ! isBrowser || typeof localStorage === 'undefined' || localStorage === null ) {
77 return
88 }
99 localStorage . setItem ( TIMELINE_LAYERS_STATE_STORAGE_ID , JSON . stringify ( state ) )
1010}
1111
1212export function getTimelineLayersStateFromStorage ( ) {
13- if ( ! isBrowser || typeof localStorage === 'undefined' ) {
13+ if ( ! isBrowser || typeof localStorage === 'undefined' || localStorage === null ) {
1414 return {
1515 recordingState : false ,
1616 mouseEventEnabled : false ,
You can’t perform that action at this time.
0 commit comments