From 41e4190096ecd703fde162428c389d53b813cab6 Mon Sep 17 00:00:00 2001 From: Fedor Katurov Date: Wed, 19 Aug 2020 13:59:11 +0700 Subject: [PATCH] fixed empty tags fallback --- src/components/node/Tags/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/node/Tags/index.tsx b/src/components/node/Tags/index.tsx index f22e0826..61e4c2ea 100644 --- a/src/components/node/Tags/index.tsx +++ b/src/components/node/Tags/index.tsx @@ -27,7 +27,7 @@ export const Tags: FC = ({ tags, is_editable, onTagsChange, ...props }) const [catTags, ordinaryTags] = useMemo( () => - tags.reduce( + (tags || []).reduce( (obj, tag) => tag.title.substr(0, 1) === '/' ? [[...obj[0], tag], obj[1]] : [obj[0], [...obj[1], tag]], [[], []]