diff options
| author | mehekj <mehek.jethani@gmail.com> | 2022-06-20 18:42:04 -0400 |
|---|---|---|
| committer | mehekj <mehek.jethani@gmail.com> | 2022-06-20 18:42:04 -0400 |
| commit | 9819886735988e448d09a292b3369e19f4a79a61 (patch) | |
| tree | 266b75feb19c3ded22f8185e8ed11eb91e6b6309 /src/client/util/History.ts | |
| parent | 3415f672292bb349c7d9ec66564933a746ee3b25 (diff) | |
Revert "Revert "Merge branch 'master' into temporalmedia-mehek""
This reverts commit 3415f672292bb349c7d9ec66564933a746ee3b25.
Diffstat (limited to 'src/client/util/History.ts')
| -rw-r--r-- | src/client/util/History.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/util/History.ts b/src/client/util/History.ts index e6f75a7db..632348306 100644 --- a/src/client/util/History.ts +++ b/src/client/util/History.ts @@ -58,8 +58,10 @@ export namespace HistoryUtil { export function getState(): ParsedUrl { const state = copyState(history.state); - state.initializers = state.initializers || {}; - return state; + if (state) { + state.initializers = state.initializers || {}; + } + return state ?? {initializers:{}}; } // export function addHandler(handler: (state: ParsedUrl | null) => void) { |
