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')
|
||||||
let props = await makeProps(key)
|
if (makeProps) {
|
||||||
this.set({ props: props })
|
let props = await makeProps(key)
|
||||||
|
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')
|
||||||
let props = await makeProps(key)
|
if (makeProps) {
|
||||||
this.set({ props: props })
|
let props = await makeProps(key)
|
||||||
|
this.set({props: props})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
VirtualListItem
|
VirtualListItem
|
||||||
|
|
Loading…
Reference in a new issue