Skip to content

Commit

Permalink
Merge pull request #16 from jccazeaux/fix/always-evaluates-callback-o…
Browse files Browse the repository at this point in the history
…n-functions

Fix/always evaluates callback on functions
  • Loading branch information
benadamstyles authored Aug 8, 2016
2 parents 515625a + 7841b18 commit d3a8d41
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@
oldValue = this.value()
this.target = next

if (this.value() !== oldValue) this.callback()
// Always call callback if value is a function. If not a function, call callback only if value changed
if (this.value() instanceof Function || this.value() !== oldValue) this.callback()
}
}

Expand Down

0 comments on commit d3a8d41

Please sign in to comment.