forked from cybrespace/pinafore
add NPE check for makeProps
This commit is contained in:
parent
2fd1f872c5
commit
ae04fddd68
|
@ -17,8 +17,10 @@
|
||||||
async oncreate() {
|
async oncreate() {
|
||||||
let makeProps = this.get('makeProps')
|
let makeProps = this.get('makeProps')
|
||||||
let key = this.get('key')
|
let key = this.get('key')
|
||||||
|
if (makeProps) {
|
||||||
let props = await makeProps(key)
|
let props = await makeProps(key)
|
||||||
this.set({props: props})
|
this.set({props: props})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
PseudoVirtualListItem
|
PseudoVirtualListItem
|
||||||
|
|
|
@ -12,8 +12,10 @@
|
||||||
async oncreate() {
|
async oncreate() {
|
||||||
let makeProps = this.get('makeProps')
|
let makeProps = this.get('makeProps')
|
||||||
let key = this.get('key')
|
let key = this.get('key')
|
||||||
|
if (makeProps) {
|
||||||
let props = await makeProps(key)
|
let props = await makeProps(key)
|
||||||
this.set({props: props})
|
this.set({props: props})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
VirtualListItem
|
VirtualListItem
|
||||||
|
|
Loading…
Reference in New Issue