We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ecf9646 commit 91b112dCopy full SHA for 91b112d
src/currency-input.tsx
@@ -40,7 +40,7 @@ function RenderCurrencyInput<BaseType = InputAttributes>(
40
value = 0;
41
// when this happens, we want to position the caret at the end
42
// of the input only if the user is on the input
43
- if (document.activeElement === innerRef.current) {
+ if (typeof document !== "undefined" && document.activeElement === innerRef.current) {
44
innerRef.current?.setSelectionRange(
45
inputValue.length + (minimumFractionDigits ?? 0),
46
0 commit comments