Use history.replaceState instead of setting location.hash (#68)
This commit is contained in:
parent
c1312c4444
commit
950dc7ec98
1 changed files with 1 additions and 1 deletions
|
|
@ -9,7 +9,7 @@ export function buildUrlForStateParams(state: State) {//partialState: {params: S
|
|||
return `${location.protocol}//${location.host}${location.pathname}#${encodeStateParamsAsFragment(state)}`;
|
||||
}
|
||||
export async function writeStateInFragment(state: State) {
|
||||
window.location.hash = await encodeStateParamsAsFragment(state);
|
||||
history.replaceState(state, '', '#' + await encodeStateParamsAsFragment(state));
|
||||
}
|
||||
async function compressString(input: string): Promise<string> {
|
||||
return btoa(String.fromCharCode(...new Uint8Array(await new Response(new ReadableStream({
|
||||
|
|
|
|||
Loading…
Reference in a new issue