Skip to content

Commit

Permalink
fix: correctly cleanup reset listener
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m committed Aug 1, 2017
1 parent 4cd0b26 commit 7fb1573
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/helpers/db-put.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function changeHandler (state, scope, _notUsedEventName, doc) {

if (doc._rev === scope.wantedRev) {
state.emitter.removeListener('change', scope.changeHandler)
state.emitter.once('reset', scope.resetHandler)
state.emitter.removeListener('reset', scope.resetHandler)
scope.resolve(scope.result)
}
}
Expand Down

0 comments on commit 7fb1573

Please sign in to comment.