reconcile.js
reconcile.js copied to clipboard
cannot apply insertChildElement to empty top level element.
I cannot seem to reconcile a lone empty div with one containing anything:
var base = document.createElement('div');
var source = document.createElement('div');
source.innerHTML = 'hello world';
var changes = reconcile.diff(source, base);
var result = reconcile.apply(changes, base);
results in:
{"unapplied":[{"action":"insertChildElement","element":{},"baseIndex":"0>0","sourceIndex":"0>0"}],"conflicts":[]}
Is this a bug or am I missing something?
Oh looks like a bug! Will fix