We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f8abf64 commit ccefc85Copy full SHA for ccefc85
src/content/utils/utils.ts
@@ -186,9 +186,9 @@ export const initUrlChangeEvent = (() => {
186
const oldReplaceState = history.replaceState
187
let preUrl: string | undefined = undefined
188
const onChange = debounce(() => {
189
- const pathname = location.pathname
190
- if (pathname !== preUrl) {
191
- preUrl = pathname
+ const url = location.href
+ if (url !== preUrl) {
+ preUrl = url
192
window.dispatchEvent(new Event('urlchange'))
193
}
194
}, 100)
0 commit comments