diff --git a/packages/console/src/hooks/use-connector-form-config-parser.tsx b/packages/console/src/hooks/use-connector-form-config-parser.tsx index d6e20f501..38ef40dcc 100644 --- a/packages/console/src/hooks/use-connector-form-config-parser.tsx +++ b/packages/console/src/hooks/use-connector-form-config-parser.tsx @@ -31,13 +31,9 @@ const useJsonStringConfigParser = () => { export const useConnectorFormConfigParser = () => { const parseJsonConfig = useJsonStringConfigParser(); - return ( - data: ConnectorFormType, - formItems: ConnectorResponse['formItems'], - skipFalsyValuesRemoval = false - ) => { + return (data: ConnectorFormType, formItems: ConnectorResponse['formItems']) => { return formItems - ? parseFormConfig(data.formConfig, formItems, skipFalsyValuesRemoval) + ? parseFormConfig(data.formConfig, formItems) : parseJsonConfig(data.jsonConfig); }; }; diff --git a/packages/console/src/pages/ConnectorDetails/ConnectorContent/index.tsx b/packages/console/src/pages/ConnectorDetails/ConnectorContent/index.tsx index da1c0dd9d..48541240f 100644 --- a/packages/console/src/pages/ConnectorDetails/ConnectorContent/index.tsx +++ b/packages/console/src/pages/ConnectorDetails/ConnectorContent/index.tsx @@ -68,11 +68,7 @@ function ConnectorContent({ isDeleted, connectorData, onConnectorUpdated }: Prop const { syncProfile, name, logo, logoDark, target, rawConfig } = data; // Apply the raw config first to avoid losing data updated from other forms that are not // included in the form items. - // Explicitly SKIP falsy values removal logic (the last argument of `configParser()` method) for social connectors. - const config = removeFalsyValues({ - ...rawConfig, - ...configParser(data, formItems, isSocialConnector), - }); + const config = removeFalsyValues({ ...rawConfig, ...configParser(data, formItems) }); const payload = isSocialConnector ? { diff --git a/packages/console/src/utils/connector-form.ts b/packages/console/src/utils/connector-form.ts index f0a7f423c..762704cef 100644 --- a/packages/console/src/utils/connector-form.ts +++ b/packages/console/src/utils/connector-form.ts @@ -22,17 +22,11 @@ const initFormData = (formItems: ConnectorConfigFormItem[], config?: Record, - formItems: ConnectorConfigFormItem[], - skipFalsyValuesRemoval = false + formItems: ConnectorConfigFormItem[] ) => { return Object.fromEntries( Object.entries(config) .map(([key, value]) => { - // Filter out empty input - if (!skipFalsyValuesRemoval && value === '') { - return null; - } - const formItem = formItems.find((item) => item.key === key); if (!formItem) {