Open thomsbg opened 8 years ago
When setting a parent path, cursors of child paths are notified of 'update' events, even if the values at the child paths didn't change.
'update'
Repro steps:
var assert = require('assert') var Baobab = require('baobab') var tree = new Baobab({ outer: { inner: 'value' } }) tree.select('outer', 'inner').on('update', e => { // will fail assert.notEqual(e.data.previousData, e.data.currentData) }) tree.set('outer', { inner: tree.get('outer', 'inner') })
Expected: the 'update' handler does not fire, since the value at path (outer, inner) did not change. Actual: an AssertionError is thrown
(outer, inner)
When setting a parent path, cursors of child paths are notified of
'update'
events, even if the values at the child paths didn't change.Repro steps:
Expected: the
'update'
handler does not fire, since the value at path(outer, inner)
did not change. Actual: an AssertionError is thrown