Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: stop is not a function #41

Closed
Smirow opened this issue Jan 28, 2023 · 2 comments
Closed

Uncaught TypeError: stop is not a function #41

Smirow opened this issue Jan 28, 2023 · 2 comments

Comments

@Smirow
Copy link

Smirow commented Jan 28, 2023

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:

export function applyBehaviors(node: HTMLElement, behaviors: Behavior[]) {
const unsubscribes = behaviors.map(behavior => behavior(node))
return () => unsubscribes.forEach(unsubscribe => unsubscribe())
}

see sveltejs/svelte#4765 and sveltejs/svelte#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?

@CaptainCodeman
Copy link
Owner

Thanks, I'll checkout those issues

@CaptainCodeman
Copy link
Owner

assuming this is fixed as those PRs are merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants