Skip to content

Commit

Permalink
fix: Dom.Event.off error while passing unexist event
Browse files Browse the repository at this point in the history
  • Loading branch information
cluezhang committed Nov 3, 2023
1 parent 322451b commit 4a872a0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/x6-common/src/dom/event/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,10 @@ export namespace Core {
let type = originType
const hook = EventHook.get(type)
type = (selector ? hook.delegateType : hook.bindType) || type
const bag = events[type] || {}
const bag = events[type]
if (!bag) {
return
}
const rns =
namespaces.length > 0
? new RegExp(`(^|\\.)${namespaces.join('\\.(?:.*\\.|)')}(\\.|$)`)
Expand Down

0 comments on commit 4a872a0

Please sign in to comment.