Skip to content

Commit

Permalink
fix(core/interaction): check that interactable exists before fire
Browse files Browse the repository at this point in the history
Close #919
  • Loading branch information
taye authored and interactjs-ci committed Jun 11, 2022
1 parent fef5a60 commit f5330d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/@interactjs/core/Interaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ export class Interaction<T extends ActionName | null = ActionName> {
}

_fireEvent<P extends EventPhase> (iEvent: InteractEvent<T, P>) {
this.interactable.fire(iEvent)
this.interactable?.fire(iEvent)

if (!this.prevEvent || iEvent.timeStamp >= this.prevEvent.timeStamp) {
this.prevEvent = iEvent
Expand Down

0 comments on commit f5330d0

Please sign in to comment.