chore: add empty tags check

This commit is contained in:
Steven 2023-08-21 00:07:11 +08:00
parent ae3b632f53
commit 8f028e4054

View File

@ -164,13 +164,13 @@ const CreateShortcutDialog: React.FC<Props> = (props: Props) => {
title: state.shortcutCreate.title, title: state.shortcutCreate.title,
description: state.shortcutCreate.description, description: state.shortcutCreate.description,
visibility: state.shortcutCreate.visibility, visibility: state.shortcutCreate.visibility,
tags: tag.split(" "), tags: tag.split(" ").filter(Boolean),
openGraphMetadata: state.shortcutCreate.openGraphMetadata, openGraphMetadata: state.shortcutCreate.openGraphMetadata,
}); });
} else { } else {
await shortcutService.createShortcut({ await shortcutService.createShortcut({
...state.shortcutCreate, ...state.shortcutCreate,
tags: tag.split(" "), tags: tag.split(" ").filter(Boolean),
}); });
} }