|
|
@ -42,8 +42,8 @@ export default function (container, newElements, { key, horizontal } = {}) { |
|
|
|
|
|
|
|
|
|
|
|
// update kept items
|
|
|
|
// update kept items
|
|
|
|
currentList = currentList.map(({ el }, i) => ({ |
|
|
|
currentList = currentList.map(({ el }, i) => ({ |
|
|
|
id: overlap[i].id, |
|
|
|
id: overlap[i] && overlap[i].id, |
|
|
|
el: el.outerHTML === overlap[i].el.outerHTML ? el : morph(el, overlap[i].el) |
|
|
|
el: el.outerHTML === overlap[i] && overlap[i].el && overlap[i].el.outerHTML ? el : morph(el, overlap[i].el) |
|
|
|
})) |
|
|
|
})) |
|
|
|
|
|
|
|
|
|
|
|
// add new items
|
|
|
|
// add new items
|
|
|
|