Skip to content

Commit 5d97bcc

Browse files
committed
fix: compatible with node25, close #977
1 parent 600ee7d commit 5d97bcc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/devtools-kit/src/core/timeline/storage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export function getTimelineLayersStateFromStorage() {
2020
selected: '',
2121
}
2222
}
23-
const state = localStorage.getItem(TIMELINE_LAYERS_STATE_STORAGE_ID)
23+
const state = typeof localStorage.getItem !== 'undefined' ? localStorage.getItem(TIMELINE_LAYERS_STATE_STORAGE_ID) : null
2424
return state
2525
? JSON.parse(state)
2626
: {

0 commit comments

Comments
 (0)