Skip to content

Commit

Permalink
Fixed issue with duplicate properties
Browse files Browse the repository at this point in the history
  • Loading branch information
rmathis committed Sep 6, 2022
1 parent c2cb961 commit 5197db0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ui/src/app/admin/component/ConfigurationForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { useProperties } from '../hoc/PropertiesProvider';
import Form from 'react-bootstrap/Form';
import FloatingLabel from 'react-bootstrap/FloatingLabel';
import { useTranslator } from '../../i18n/hooks';
import { includes } from 'lodash';
import { includes, uniqBy } from 'lodash';

export function ConfigurationForm({ configurations, configuration = {}, loading, onSave, onCancel }) {

Expand Down Expand Up @@ -51,7 +51,9 @@ export function ConfigurationForm({ configurations, configuration = {}, loading,

const filtered = parsed.filter(p => includes(names, p.propertyName) ? false : true);

append(filtered);
const deduped = uniqBy(filtered, (i) => i.propertyName);

append(deduped);
};

const saveConfig = (formValues) => {
Expand Down

0 comments on commit 5197db0

Please sign in to comment.