You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using the Tabs component, I get a ReferenceError: HTMLButtonElement is not defined error.
This happens when the two conditions meet:
Set Tab#as prop to something besides "button".
Renders the page in SvelteKit ssr mode.
Setting ssr: false in hooks.js (see svelte-kit doc on hooks) can avoid this problem, but there should be a fundamental solution.
Seems like HTMLButtonElement is not defined in ssr mode, and the code is only reached if as is not "button" (default value):
Describe the bug
When using the
Tabs
component, I get aReferenceError: HTMLButtonElement is not defined
error.This happens when the two conditions meet:
Tab#as
prop to something besides"button"
.Setting
ssr: false
inhooks.js
(see svelte-kit doc on hooks) can avoid this problem, but there should be a fundamental solution.Seems like
HTMLButtonElement
is not defined in ssr mode, and the code is only reached ifas
is not"button"
(default value):svelte-headlessui/src/lib/utils/resolve-button-type.ts
Lines 2 to 12 in a6c6a8e
To Reproduce
Here's a repo with a fresh svelte-kit starter with basic Tabs demo. (index.svelte#L8-19)
Library version
Using
[email protected]
The text was updated successfully, but these errors were encountered: