From 9a72e7b9e6e8544cfb865eac24439680e379d510 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=A4fer?= Date: Wed, 10 Jul 2019 18:01:18 +0200 Subject: [PATCH] Proper null handling FYI @mattwr18 --- webapp/components/comments/CommentList/index.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webapp/components/comments/CommentList/index.vue b/webapp/components/comments/CommentList/index.vue index ab5916629..ee1370bea 100644 --- a/webapp/components/comments/CommentList/index.vue +++ b/webapp/components/comments/CommentList/index.vue @@ -47,7 +47,8 @@ export default { }, watch: { Post(post) { - this.comments = post[0].comments || [] + const [first] = post + this.comments = first && first.comments || [] }, }, apollo: {