Merge pull request #1921 from thecodingmachine/fix-hash-parameter-from-standby

clear hashParams after moving player with moveTo param
This commit is contained in:
grégoire parant 2022-02-24 20:01:26 +01:00 committed by GitHub
commit 9da3c9c169
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -1598,6 +1598,8 @@ ${escapedMessage}
}
})
.catch((reason) => console.warn(reason));
urlManager.clearHashParameter();
} catch (err) {
console.warn(`Cannot proceed with moveTo command:\n\t-> ${err}`);
}

View File

@ -58,6 +58,10 @@ class UrlManager {
return this.getHashParameters()[name];
}
public clearHashParameter(): void {
window.location.hash = "";
}
private getHashParameters(): Record<string, string> {
return window.location.hash
.substring(1)