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 a6c6a8e commit 219d289Copy full SHA for 219d289
src/lib/utils/resolve-button-type.ts
@@ -7,6 +7,6 @@ export function resolveButtonType(
7
let tag = props.as ?? "button";
8
if (typeof tag === "string" && tag.toLowerCase() === "button")
9
return "button";
10
- if (ref instanceof HTMLButtonElement) return "button";
+ if (ref && ref instanceof HTMLButtonElement) return "button";
11
return undefined;
12
}
0 commit comments