Skip to content

Commit

Permalink
Merge pull request #70 from croz-ltd/bugfix_fixLodashUniqByImport
Browse files Browse the repository at this point in the history
Fix lodash uniqBy import
  • Loading branch information
jtomic-croz authored Sep 9, 2024
2 parents 8a6f70f + 7d435fd commit 15fa533
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/great-walls-film.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@croz/nrich-form-configuration-core": patch
---

Fix lodash uniqBy import
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*
*/

import _ from "lodash";
import _uniqBy from "lodash/uniqBy";

import { FormConfiguration, FormConfigurationConfiguration, FormYupConfiguration } from "../api";
import { FormConfigurationValidationConverter } from "../converter";
Expand All @@ -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<FormConfiguration[]> => {
Expand Down

0 comments on commit 15fa533

Please sign in to comment.