-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
A simple test case:
it 'should properly handle new null property', ->
before = {}
after = { newProp: null }
changesets.applyChanges before, changesets.diff before, after
expect(after).to.eql before
Fails with "TypeError: Cannot read property 'length' of undefined"
diff-json/src/changesets.coffee
Line 212 in 4356e69
| if change.value? or change.type is changeset.op.REMOVE |
should probably be:
if !change.changes
In its current form applyChanges calls applyBranchChanges for the add of a new property with a value of null. applyBranchChanges expects a changes array to exist on the change and calls length on undefined.
0x80
Metadata
Metadata
Assignees
Labels
No labels