avoiding notification crash by making metadata check more redundant

This commit is contained in:
Nouman Tahir 2021-06-21 21:32:22 +05:00
parent 414e682c04
commit 0231fc5fb7

View File

@ -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);
}