Skip to content

Commit 219d289

Browse files
committed
Fix resolveButtonType for SSR
Fixes rgossiaux#94
1 parent a6c6a8e commit 219d289

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/utils/resolve-button-type.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ export function resolveButtonType(
77
let tag = props.as ?? "button";
88
if (typeof tag === "string" && tag.toLowerCase() === "button")
99
return "button";
10-
if (ref instanceof HTMLButtonElement) return "button";
10+
if (ref && ref instanceof HTMLButtonElement) return "button";
1111
return undefined;
1212
}

0 commit comments

Comments
 (0)