Closed AdamWillden closed 9 years ago
Thanks Adam. The PR is definitely on the right track, but misses the case where there is one node in the template.
I'll write some tests, so we capture the issue you highlighted and the issues I've just mentioned.
Cheers
Ah I see, that's what I get for only looking at one bit of code! At least this should clear things up for you to fix, cheers.
The item was being removed from the DOM meaning
ptr.nextSibling
returned null rather than the intended next sibling. Therefore we need to captureptr.nextSibling
beforeptr
is removed then apply it toptr
after.There might well be a better way to organise the while loop but this fixes the issue at hand.