Skip to content

Commit b0150ed

Browse files
afc163zombieJ
andauthored
fix SSR render (#144)
* fix SSR render a7e3373#r39550472 * adjust logic Co-authored-by: zombiej <[email protected]>
1 parent 08f04a8 commit b0150ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/useForm.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ export class FormStore {
139139
private timeoutId: number = null;
140140

141141
private warningUnhooked = () => {
142-
if (process.env.NODE_ENV !== 'production' && !this.timeoutId) {
142+
if (process.env.NODE_ENV !== 'production' && !this.timeoutId && typeof window !== 'undefined') {
143143
this.timeoutId = window.setTimeout(() => {
144144
this.timeoutId = null;
145145

0 commit comments

Comments
 (0)