diff --git a/src/panelWebView/components/Fields/WrapperField.tsx b/src/panelWebView/components/Fields/WrapperField.tsx index c67e4eac..48469984 100644 --- a/src/panelWebView/components/Fields/WrapperField.tsx +++ b/src/panelWebView/components/Fields/WrapperField.tsx @@ -70,6 +70,11 @@ export const WrapperField: React.FunctionComponent = ({ useEffect(() => { let value: any = parent[field.name]; + + if (field.type === "tags" || field.type === "categories" || field.type === "taxonomy") { + setFieldValue(value); + return; + }; if (field.type === 'datetime') { value = getDate(value) || undefined; @@ -83,10 +88,6 @@ export const WrapperField: React.FunctionComponent = ({ } onSendUpdate(field.name, value, parentFields); - } else { - if (field.type === "tags" || field.type === "categories" || field.type === "taxonomy") { - value = []; - } } // Check if the field value contains a placeholder