Skip to content

Commit

Permalink
fix(): (#1091)
Browse files Browse the repository at this point in the history
  • Loading branch information
SeverS authored Apr 19, 2021
1 parent e202698 commit d009c0b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ui/design/src/components/Cards/form-cards/box-form-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,19 +136,19 @@ const BoxFormCard: React.FC<IBoxFormCardProps> = props => {
) {
images.coverImage = coverImage;
}
let userName: string | undefined;
let userName: string | undefined = formValues.userName;
if (providerData && providerData.default) {
const provider = providerData.default.find(
p => p.property === 'userName' && p.provider === 'ewa.providers.basic',
);
if (provider) {
if (provider && !formValues.userName) {
userName = provider.value;
}
}
setFormValues(prevValues => ({
...prevValues,
...rest,
...images,
...prevValues,
userName,
}));
}, [JSON.stringify(providerData), JSON.stringify(formValues)]);
Expand Down

0 comments on commit d009c0b

Please sign in to comment.