diff --git a/web/app/(home)/CreateMetalakeDialog.js b/web/app/(home)/CreateMetalakeDialog.js index ace3036012c..dc6be5cf7c8 100644 --- a/web/app/(home)/CreateMetalakeDialog.js +++ b/web/app/(home)/CreateMetalakeDialog.js @@ -91,11 +91,13 @@ const CreateMetalakeDialog = props => { } const onSubmit = data => { - const properties = innerProps.reduce((acc, item) => { - acc[item.key] = item.value + const properties = innerProps + .filter(i => i.key.trim() !== '') + .reduce((acc, item) => { + acc[item.key] = item.value - return acc - }, {}) + return acc + }, {}) const metalakeData = { ...data, diff --git a/web/app/metalakes/CreateCatalogDialog.js b/web/app/metalakes/CreateCatalogDialog.js index e2d9243854d..049a599c7d4 100644 --- a/web/app/metalakes/CreateCatalogDialog.js +++ b/web/app/metalakes/CreateCatalogDialog.js @@ -174,11 +174,13 @@ const CreateCatalogDialog = props => { .then(() => { let properties = {} - const prevProperties = innerProps.reduce((acc, item) => { - acc[item.key] = item.value + const prevProperties = innerProps + .filter(i => i.key.trim() !== '') + .reduce((acc, item) => { + acc[item.key] = item.value - return acc - }, {}) + return acc + }, {}) const { 'catalog-backend': catalogBackend,