Closed mgschoen closed 5 years ago
Suppose you have an array in your model and watch it:
var app = new Prosecco(document.getElementById('app-root'), { list: [ 'a', 'b', 'c' ] }) app.watch('list', function (oldList, newList) { alert('Changed from "' + oldList + '" to "' + newList + '"') })
Manipulating a single value in that array makes the watcher function fire twice. E.g.:
app.model.list.push('f')
Should fire only once
Solved in https://github.com/mgschoen/prosecco-js/commit/de16c67f7497543afcf85de85d0e823d2ec0e8d2
Suppose you have an array in your model and watch it:
Manipulating a single value in that array makes the watcher function fire twice. E.g.:
Should fire only once