mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-20 11:24:05 -06:00
fix: remove unnecessary type assertions for window.addCleanup in popover
This commit is contained in:
parent
4d30363545
commit
b3ab6fdd59
@ -167,9 +167,8 @@ document.addEventListener("nav", () => {
|
||||
for (const link of links) {
|
||||
link.addEventListener("mouseenter", mouseEnterHandler)
|
||||
link.addEventListener("mouseleave", clearActivePopoverAndHighlights)
|
||||
// Use type assertion to avoid TypeScript error when checking individual files
|
||||
if (typeof (window as any).addCleanup === "function") {
|
||||
;(window as any).addCleanup(() => {
|
||||
if (typeof window.addCleanup === "function") {
|
||||
window.addCleanup(() => {
|
||||
link.removeEventListener("mouseenter", mouseEnterHandler)
|
||||
link.removeEventListener("mouseleave", clearActivePopoverAndHighlights)
|
||||
})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user