Skip to content

Commit

Permalink
Update observable.mixin.js (#5606)
Browse files Browse the repository at this point in the history
Consistent return in stopObserving() and fire().
  • Loading branch information
severyanov authored and asturur committed May 19, 2019
1 parent 43de9c3 commit 4f972cf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/mixins/observable.mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
*/
function stopObserving(eventName, handler) {
if (!this.__eventListeners) {
return;
return this;
}

// remove all key/value pairs (event name -> event handler)
Expand Down Expand Up @@ -93,12 +93,12 @@
*/
function fire(eventName, options) {
if (!this.__eventListeners) {
return;
return this;
}

var listenersForEvent = this.__eventListeners[eventName];
if (!listenersForEvent) {
return;
return this;
}

for (var i = 0, len = listenersForEvent.length; i < len; i++) {
Expand Down

0 comments on commit 4f972cf

Please sign in to comment.