Skip to content

Commit

Permalink
Merge pull request #861 from aktanoff/react-imask-hook-initialized-fix
Browse files Browse the repository at this point in the history
fix: React-imask's hook never sets initialized state to true, if prop…
  • Loading branch information
uNmAnNeR authored May 24, 2023
2 parents 2c3f872 + 4407b48 commit f8ab81e
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 f8ab81e

Please sign in to comment.