Fix resolveButtonType for SSR

Fixes #94
This commit is contained in:
Ryan Gossiaux
2022-05-16 13:17:33 -07:00
parent a6c6a8ed23
commit 219d289f87

View File

@@ -7,6 +7,6 @@ export function resolveButtonType(
let tag = props.as ?? "button";
if (typeof tag === "string" && tag.toLowerCase() === "button")
return "button";
if (ref instanceof HTMLButtonElement) return "button";
if (ref && ref instanceof HTMLButtonElement) return "button";
return undefined;
}