[Glitch] Fix opening modals losing some location parameters

Port 4ebdfed8ea to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
pull/2951/head
Claire 2025-01-21 10:53:52 +01:00
parent ce7fb94306
commit 785543b5a6
1 changed files with 2 additions and 2 deletions

View File

@ -123,9 +123,9 @@ class ModalRoot extends PureComponent {
}
_ensureHistoryBuffer () {
const { pathname, state } = this.history.location;
const { pathname, search, hash, state } = this.history.location;
if (!state || state.mastodonModalKey !== this._modalHistoryKey) {
this.history.push(pathname, { ...state, mastodonModalKey: this._modalHistoryKey });
this.history.push({ pathname, search, hash }, { ...state, mastodonModalKey: this._modalHistoryKey });
}
}