reconcile.js icon indicating copy to clipboard operation
reconcile.js copied to clipboard

cannot apply insertChildElement to empty top level element.

Open jjttjj opened this issue 7 years ago • 1 comments

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?

jjttjj avatar Aug 24 '18 19:08 jjttjj

Oh looks like a bug! Will fix

nyxtom avatar Aug 24 '18 20:08 nyxtom