Skip to content

Commit

Permalink
fixed the warning msg when there is no slot exists.
Browse files Browse the repository at this point in the history
Error in render: "TypeError: Cannot read property '0' of undefined"
  • Loading branch information
wanyaxing committed Mar 6, 2018
1 parent a5f90ac commit 0476b1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default {
return this.$scopedSlots.error(this.error)
} else if (this.resolved) {
return this.$scopedSlots.default(this.data)
} else {
} else if (this.$slots.default && this.$slots.default.length>0){
return this.$slots.default[0]
}
},
Expand Down

0 comments on commit 0476b1a

Please sign in to comment.