svelte-headlessui icon indicating copy to clipboard operation
svelte-headlessui copied to clipboard

Uncaught TypeError: stop is not a function

Open Smirow opened this issue 2 years ago • 1 comments
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?

Smirow avatar Jan 28 '23 14:01 Smirow

Thanks, I'll checkout those issues

CaptainCodeman avatar Feb 08 '23 19:02 CaptainCodeman

assuming this is fixed as those PRs are merged

CaptainCodeman avatar Jun 13 '24 19:06 CaptainCodeman