From 0231fc5fb7b5b9d4d28f632618d563d111d0e15f Mon Sep 17 00:00:00 2001 From: Nouman Tahir Date: Mon, 21 Jun 2021 21:32:22 +0500 Subject: [PATCH] avoiding notification crash by making metadata check more redundant --- src/components/postView/view/postDisplayView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/postView/view/postDisplayView.js b/src/components/postView/view/postDisplayView.js index bd6b5e82b..69eaf38e6 100644 --- a/src/components/postView/view/postDisplayView.js +++ b/src/components/postView/view/postDisplayView.js @@ -61,7 +61,7 @@ const PostDisplayView = ({ useEffect(() => { if (post) { - const _tags = post.json_metadata ? post.json_metadata.tags : []; + const _tags = get(post.json_metadata, 'tags', []); if (post.category && _tags[0] !== post.category) { _tags.splice(0, 0, post.category); }