Skip to content

Commit

Permalink
fix: React-imask's hook never sets initialized state to true, if prop…
Browse files Browse the repository at this point in the history
…s never mutated
  • Loading branch information
Redal Aktanov committed May 23, 2023
1 parent 2c3f872 commit 4407b48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-imask/src/hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function useIMask<
} else {
mask?.updateOptions(opts);
}
setInitialized(Boolean(mask));
setInitialized(Boolean(maskRef.current));
}, [opts, _destroyMask, _onAccept]);

useEffect(() => {
Expand Down

0 comments on commit 4407b48

Please sign in to comment.