diff --git a/.changeset/great-walls-film.md b/.changeset/great-walls-film.md new file mode 100644 index 0000000..ec28ea3 --- /dev/null +++ b/.changeset/great-walls-film.md @@ -0,0 +1,5 @@ +--- +"@croz/nrich-form-configuration-core": patch +--- + +Fix lodash uniqBy import diff --git a/libs/form-configuration/core/src/loader/fetch-form-configurations.ts b/libs/form-configuration/core/src/loader/fetch-form-configurations.ts index 2ad5d2a..965bf8f 100644 --- a/libs/form-configuration/core/src/loader/fetch-form-configurations.ts +++ b/libs/form-configuration/core/src/loader/fetch-form-configurations.ts @@ -15,7 +15,7 @@ * */ -import _ from "lodash"; +import _uniqBy from "lodash/uniqBy"; import { FormConfiguration, FormConfigurationConfiguration, FormYupConfiguration } from "../api"; import { FormConfigurationValidationConverter } from "../converter"; @@ -24,7 +24,7 @@ import { useFormConfigurationStore } from "../store"; const mergeFormYupConfigurationsWithoutDuplicates = (oldFormYupConfiguration: FormYupConfiguration[], newFormYupConfiguration: FormYupConfiguration[]) => { const mergedFormYupConfigurations = [...oldFormYupConfiguration, ...newFormYupConfiguration]; - return _.uniqBy(mergedFormYupConfigurations, "formId"); + return _uniqBy(mergedFormYupConfigurations, "formId"); }; export const fetchFormConfigurations = async ({ url, requestOptionsResolver, additionalValidatorConverters }: FormConfigurationConfiguration): Promise => {