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 cf88874 commit f8222deCopy full SHA for f8222de
.changeset/sixty-times-cheat.md
@@ -0,0 +1,5 @@
1
+---
2
+'@formwerk/core': patch
3
4
+
5
+fix(core): OTP fields crashing in SSR environments
packages/core/src/utils/platform.ts
@@ -1,11 +1,11 @@
import { isSSR } from '../utils/common';
export function isMac() {
- const macRE = /^Mac/i;
if (isSSR) {
6
return false;
7
}
8
+ const macRE = /^Mac/i;
9
let platform = navigator.platform;
10
if ('userAgentData' in navigator) {
11
platform = (navigator.userAgentData as { platform: string }).platform;
@@ -15,5 +15,9 @@ export function isMac() {
15
16
17
export function isFirefox() {
18
+ if (isSSR) {
19
+ return false;
20
+ }
21
22
return /Firefox/i.test(navigator.userAgent);
23
0 commit comments