fix: filter same tags in editor (#457)

This commit is contained in:
iku
2023-04-28 23:25:01 +01:00
committed by GitHub
parent 4d036d1958
commit 7ba7aed814
@@ -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 }),