Skip to content

Commit

Permalink
fix: Fix StoppableEvent (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
flc1125 authored Apr 15, 2023
1 parent 2f79260 commit 8891981
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dispatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func (d *Dispatcher) Listen(name string, listener ...Listener) {
// Dispatch event to all listeners
func (d *Dispatcher) Dispatch(event Event) {
for _, listener := range d.GetListeners(event.Name()) {
if event.(StoppableEvent) != nil && event.(StoppableEvent).IsPropagationStopped() {
if e, ok := event.(StoppableEvent); ok && e.IsPropagationStopped() {
return
}

Expand Down

0 comments on commit 8891981

Please sign in to comment.