Skip to content

Commit c8a9056

Browse files
authored
Bugfix crash when changing password (#1744)
1 parent a8240cf commit c8a9056

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/browser/modules/Stream/Auth/revealable-password-input.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,16 @@ export default function RevealablePasswordInput({
4141
)
4242
}
4343

44-
function useReveal(isRevealed: any) {
45-
const inputRef = useRef<any>(null)
44+
function useReveal(isRevealed: boolean) {
45+
const inputRef = useRef<HTMLInputElement>(null)
4646

4747
useEffect(() => {
4848
if (!inputRef.current) {
4949
return
5050
}
5151

5252
inputRef.current.type = isRevealed ? 'text' : 'password'
53-
54-
return () => {
55-
inputRef.current.type = 'password'
56-
}
57-
}, [inputRef, isRevealed])
53+
}, [isRevealed])
5854

5955
return inputRef
6056
}

0 commit comments

Comments
 (0)