Skip to content
This repository has been archived by the owner on Jun 30, 2022. It is now read-only.

Commit

Permalink
fix: handle stop watching events if no event listener set
Browse files Browse the repository at this point in the history
  • Loading branch information
satello committed May 25, 2018
1 parent 6c5397e commit 4f35bea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/kleros.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ class Kleros {
* Stop watching for events on the Arbitrator initialized in the Kleros Instance.
*/
stopWatchingForEvents = () => {
this.eventListener.stopWatchingForEvents(this.arbitrator)
if (this.eventListener)
this.eventListener.stopWatchingForEvents(this.arbitrator)
}

/**
Expand Down

0 comments on commit 4f35bea

Please sign in to comment.