Skip to content

Commit

Permalink
fix(EventTarget): dispatchEvent return is boolean (#1363)
Browse files Browse the repository at this point in the history
  • Loading branch information
jlopes90 committed Jul 10, 2024
1 parent 5be811c commit 08a66e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/eventTarget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class CornerstoneEventTarget implements EventTarget {
dispatchEvent(event) {
if (!this.listeners[event.type]) {
//console.warn(`Skipping dispatch since there are no listeners for ${event.type}`);
return;
return !event.defaultPrevented;
}

const stack = this.listeners[event.type].slice();
Expand Down

0 comments on commit 08a66e5

Please sign in to comment.