fix edge case around event permalinks
This commit is contained in:
parent
b23aad28ca
commit
331678b913
1 changed files with 4 additions and 1 deletions
|
@ -74,7 +74,10 @@ function onNewScreen(screen: string, replaceLast = false) {
|
||||||
lastLocationHashSet = hash;
|
lastLocationHashSet = hash;
|
||||||
|
|
||||||
// if the new hash is a substring of the old one then we are stripping fields e.g `via` so replace history
|
// if the new hash is a substring of the old one then we are stripping fields e.g `via` so replace history
|
||||||
if (screen.startsWith("room/") && window.location.hash.startsWith(hash)) {
|
if (screen.startsWith("room/") &&
|
||||||
|
window.location.hash.includes("/$") === hash.includes("/$") && // only if both did or didn't contain event link
|
||||||
|
window.location.hash.startsWith(hash)
|
||||||
|
) {
|
||||||
replaceLast = true;
|
replaceLast = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue