-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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: Cannot read property 'update' of null" when calling set in an event after destroy #744
Comments
@btakita what should the intended behaviour be? And what's up man lol. |
Would a dev mode error like this solve the problem?
|
I'd rather it not throw an error. Right now, I shimmed a method that checks to see if the component is "active" before calling
|
What's the situation in which |
It's difficult to avoid this issue using events that are ordered by definition, as previously defined events may triggers Here are three areas where the logic could be handled:
I'm ok with I would slightly prefer the |
I debounce some method calls to the next animation frame, and in those methods I've been forced to check for |
@TehShrike @btakita #755 fixes this by replacing the
...which will no longer be possible, because (I think) there's no longer a need for the |
that sounds like the perfect solution. Could all user-defined methods also be replaced with |
handle set after destroy, and move destroy into shared helpers
This manifests when using an evented object that has a listener that destroys the Component & a subsequent listener that sets a value on the Component.
https://svelte.technology/repl?version=1.27.0&gist=16c53dce350c0a67c6bb1ff8db61ab88
The text was updated successfully, but these errors were encountered: