fix: filter same tags in editor (#457)

This commit is contained in:
iku 2023-04-29 06:25:01 +08:00 committed by GitHub
parent 4d036d1958
commit 7ba7aed814
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -207,8 +207,10 @@ export default function SubdomainEditor() {
if (check) {
toast.error(check)
} else {
const uniqueTags = Array.from(new Set(values.tags.split(","))).join(",")
createOrUpdatePage.mutate({
...values,
tags: uniqueTags,
slug: values.slug || defaultSlug,
siteId: subdomain,
...(visibility === PageVisibilityEnum.Draft ? {} : { pageId: pageId }),