Proper null handling

FYI @mattwr18
This commit is contained in:
Robert Schäfer 2019-07-10 18:01:18 +02:00
parent 3447cdffeb
commit 9a72e7b9e6

View File

@ -47,7 +47,8 @@ export default {
},
watch: {
Post(post) {
this.comments = post[0].comments || []
const [first] = post
this.comments = first && first.comments || []
},
},
apollo: {