diff options
| author | bobzel <zzzman@gmail.com> | 2022-06-10 13:02:49 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2022-06-10 13:02:49 -0400 |
| commit | 04fd9f20ccdc204dad5724008b076cbf9ea7b874 (patch) | |
| tree | 84a2951d193d3f6cc0780c3d199d214c66d3497a /src/client/util/History.ts | |
| parent | 9c5d0fc25b14619bedf96a9988be4f8c254812c4 (diff) | |
fixed some initialization problems with tabs
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) { |
