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

WatchJS does multiple callbacks when we push an element on a watched Array #65

Open
mritzman opened this issue Jan 3, 2014 · 1 comment

Comments

@mritzman
Copy link

mritzman commented Jan 3, 2014

If you have multiple watchers for an array and push an element, WatchJS calls EACH watcher as many as the number of total watchers on the array. For example, if you have an array with two watchers, EACH watcher is called two times when an element is pushed onto the array. If you have an array with three watchers, each watcher is called three times when an element is added...

This is problem is reproduced with here: http://jsfiddle.net/66zzW/

Here is a screenshot showing the problem:
watchjsproblem

@mhelvens
Copy link

mhelvens commented Aug 7, 2014

This seems to be the case for any change:

http://jsfiddle.net/mhelvens/7q9rrLya/1/

That's pretty important.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants