[Glitch] Fix clicking a status multiple times causing duplicate entries in browser history
Port ac039d5f1323c46062d004896996f50549bfa38b to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
f41981e772
commit
13a07e44f1
@ -377,7 +377,11 @@ class Status extends ImmutablePureComponent {
|
|||||||
if (newTab) {
|
if (newTab) {
|
||||||
window.open(path, '_blank', 'noopener');
|
window.open(path, '_blank', 'noopener');
|
||||||
} else {
|
} else {
|
||||||
history.push(path);
|
if (history.location.pathname.replace('/deck/', '/') === path) {
|
||||||
|
history.replace(path);
|
||||||
|
} else {
|
||||||
|
history.push(path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user