From ac039d5f1323c46062d004896996f50549bfa38b Mon Sep 17 00:00:00 2001 From: Claire Date: Sat, 21 Jun 2025 11:00:38 +0200 Subject: [PATCH] Fix clicking a status multiple times causing duplicate entries in browser history (#35118) --- app/javascript/mastodon/components/status.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/javascript/mastodon/components/status.jsx b/app/javascript/mastodon/components/status.jsx index 0f9d751eb..29fd4234d 100644 --- a/app/javascript/mastodon/components/status.jsx +++ b/app/javascript/mastodon/components/status.jsx @@ -301,7 +301,11 @@ class Status extends ImmutablePureComponent { if (newTab) { window.open(path, '_blank', 'noopener'); } else { - history.push(path); + if (history.location.pathname.replace('/deck/', '/') === path) { + history.replace(path); + } else { + history.push(path); + } } };