fix(examples): totalHeight 0 on remove last element reorder animation

Co-authored-by: Shahar Dawn Or <mightyiampresence@gmail.com>
pull/781/head
Cathy 5 years ago committed by GitHub
parent db59f33305
commit afa77c04d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -90,7 +90,9 @@ function render () {
m.offset = last ? last.offset + last.elmHeight + margin : margin
return acc.concat(m)
}, [])
totalHeight = data[data.length - 1].offset + data[data.length - 1].elmHeight
totalHeight = data.length === 0
? 0
: data[data.length - 1].offset + data[data.length - 1].elmHeight
vnode = patch(vnode, view(data))
}

Loading…
Cancel
Save