1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 12:56:41 +07:00

fixed empty tags fallback

This commit is contained in:
Fedor Katurov 2020-08-19 13:59:11 +07:00
parent 20f49a52b5
commit 41e4190096

View file

@ -27,7 +27,7 @@ export const Tags: FC<IProps> = ({ tags, is_editable, onTagsChange, ...props })
const [catTags, ordinaryTags] = useMemo( const [catTags, ordinaryTags] = useMemo(
() => () =>
tags.reduce( (tags || []).reduce(
(obj, tag) => (obj, tag) =>
tag.title.substr(0, 1) === '/' ? [[...obj[0], tag], obj[1]] : [obj[0], [...obj[1], tag]], tag.title.substr(0, 1) === '/' ? [[...obj[0], tag], obj[1]] : [obj[0], [...obj[1], tag]],
[[], []] [[], []]