Skip to content

Commit

Permalink
fix: Reset password error handling (#3271)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyle-ssg committed Jan 16, 2024
1 parent f88f334 commit a54352f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion frontend/web/components/base/forms/InputGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,10 @@ const InputGroup = class extends Component {
id={props.inputProps.name ? `${props.inputProps.name}-error` : ''}
className='text-danger'
>
{inputProps.error}
{typeof inputProps.error === 'string'
? inputProps.error
: !!inputProps.error?.length &&
inputProps.error.map((err, i) => <div key={i}>{err}</div>)}
</span>
</span>
)}
Expand Down
2 changes: 1 addition & 1 deletion frontend/web/components/pages/PasswordResetPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const PasswordResetPage = class extends Component {
<InputGroup
inputProps={{
className: 'full-width',
error: error && error.new_password1,
error: error && error.new_password,
name: 'new-password',
}}
title='New Password'
Expand Down

3 comments on commit a54352f

@vercel
Copy link

@vercel vercel bot commented on a54352f Jan 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

docs – ./docs

docs.bullet-train.io
docs-flagsmith.vercel.app
docs-git-main-flagsmith.vercel.app
docs.flagsmith.com

@vercel
Copy link

@vercel vercel bot commented on a54352f Jan 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on a54352f Jan 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.