mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-06 05:30:08 +00:00
use addEventListener
This commit is contained in:
@@ -160,11 +160,10 @@ export const useSubgraphNavigationStore = defineStore(
|
||||
|
||||
//Allow navigation with forward/back buttons
|
||||
const routeHash = ref(window.location.hash)
|
||||
const originalOnHashChange = window.onhashchange
|
||||
window.onhashchange = (...args) => {
|
||||
routeHash.value = window.location.hash
|
||||
return originalOnHashChange?.apply(window, args)
|
||||
}
|
||||
addEventListener(
|
||||
'hashchange',
|
||||
() => (routeHash.value = window.location.hash)
|
||||
)
|
||||
let blockHashUpdate = false
|
||||
let initialLoad = true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user