fix null error in VirtualListFooter.html (#456)

This commit is contained in:
Nolan Lawson 2018-08-21 07:06:53 -07:00 committed by GitHub
parent 6ad20e72a7
commit 65ac7e22f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -17,8 +17,13 @@
export default {
oncreate () {
requestAnimationFrame(() => {
let node = this.refs.node
if (!node) {
return
}
mark('VirtualListFooter gBCR')
let rect = this.refs.node.getBoundingClientRect()
let rect = node.getBoundingClientRect()
stop('VirtualListFooter gBCR')
this.store.setForRealm({footerHeight: rect.height})
})