svelte-headlessui
svelte-headlessui copied to clipboard
Uncaught TypeError: stop is not a function
trafficstars
I got this error:
index.mjs:54 Uncaught TypeError: stop is not a function
at index.mjs:54:17
at behavior.ts:6:52
when a menu (dropdown) is unmounted while redirecting. Seems like it has something to do with unsubscribing: https://github.com/CaptainCodeman/svelte-headlessui/blob/f11d3ad90023e13c7a3ae0e086a4b150c9db1ca1/packages/lib/src/lib/internal/behavior.ts#L4-L7
see https://github.com/sveltejs/svelte/issues/4765 and https://github.com/sveltejs/svelte/pull/8186
Maybe the error should be catched and silenced while waiting for the PR above to land, or finding a way to prevent these falsy unsubscribe?
Thanks, I'll checkout those issues
assuming this is fixed as those PRs are merged