If a record (probably other elements) contains a plain JSON object wich needs a replace operation, it will be replaced by a Immutable map.
const R = Record({test: {wrong: false}})
var patch = diff(R(), R({test: {wrong: true}})
console.log(patch.getIn([0,"value"]).wrong) // prints undefined instead of true
This happens because after computing the patch, Immutable.fromJS() is called which interprets the plain objects as immutable maps. The fix is simple and I can send you a pull request. I was just wondering if this was intentional or not.
If a record (probably other elements) contains a plain JSON object wich needs a replace operation, it will be replaced by a Immutable map.
This happens because after computing the patch, Immutable.fromJS() is called which interprets the plain objects as immutable maps. The fix is simple and I can send you a pull request. I was just wondering if this was intentional or not.