Skip to content

Commit cdb48fe

Browse files
authored
Event: not trigger URL changed when readthedocs-* params changed (#553)
Small fix to the current logic.
1 parent f66a963 commit cdb48fe

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/utils.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,9 @@ export function setupHistoryEvents() {
235235
//
236236
// import { DOCDIFF_URL_PARAM } from "./docdiff";
237237
toURL.searchParams.delete("readthedocs-diff");
238+
toURL.searchParams.delete("readthedocs-diff-chunk");
239+
fromURL.searchParams.delete("readthedocs-diff");
240+
fromURL.searchParams.delete("readthedocs-diff-chunk");
238241

239242
// Dispatch the event only if the new URL is not just the DOCDIFF_URL_PARAM added.
240243
if (toURL.href !== fromURL.href) {

0 commit comments

Comments
 (0)