From 8f028e4054cb0a6c864b662dc9f0af233e47b3fd Mon Sep 17 00:00:00 2001 From: Steven Date: Mon, 21 Aug 2023 00:07:11 +0800 Subject: [PATCH] chore: add empty tags check --- web/src/components/CreateShortcutDialog.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/components/CreateShortcutDialog.tsx b/web/src/components/CreateShortcutDialog.tsx index 03e07f0..57b87f3 100644 --- a/web/src/components/CreateShortcutDialog.tsx +++ b/web/src/components/CreateShortcutDialog.tsx @@ -164,13 +164,13 @@ const CreateShortcutDialog: React.FC = (props: Props) => { title: state.shortcutCreate.title, description: state.shortcutCreate.description, visibility: state.shortcutCreate.visibility, - tags: tag.split(" "), + tags: tag.split(" ").filter(Boolean), openGraphMetadata: state.shortcutCreate.openGraphMetadata, }); } else { await shortcutService.createShortcut({ ...state.shortcutCreate, - tags: tag.split(" "), + tags: tag.split(" ").filter(Boolean), }); }