Skip to content

Commit cf58fcd

Browse files
committed
fix: Changing an uncontrolled input to be controlled on edit user password.
1 parent 2374c23 commit cf58fcd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • client/src/containers/updateuser

client/src/containers/updateuser/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const defaultLoadingState = {
1313

1414
function UpdateUserContainer () {
1515
const location = useLocation()
16-
const [state, setState] = useState(location?.state || defaultState)
16+
const [state, setState] = useState(location.state ? { ...location.state, password: '' } : defaultState)
1717
const [loading, setLoading] = useState(defaultLoadingState)
1818

1919
const onInputChange = (e) => {

0 commit comments

Comments
 (0)