Navigation Menu

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

fix: out transition function when config is undefined #7906

Closed
wants to merge 7 commits into from

Conversation

brunocalou
Copy link

This PR closes #7904

As stated on the issue, when performing quick actions, the Svelte will throw an Exception and stop working (Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'tick'))

Investigating the problem, the config object on the create_out_transition function is undefined, so calling config.tick() will throw this exception. I added the ?. operator so it would call the tick function just if it is defined.

After that was solved, another issue emerged, but it was related to the detach function on dom.ts file. It was calling
removeChild from a parentNode, but parentNode was null (node.parentNode?.removeChild(node);). I added the ?. operator so it would remove the child just if the parent node exists.

Before submitting the PR, please make sure you do the following

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • Prefix your PR title with [feat], [fix], [chore], or [docs].
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests with npm test and lint the project with npm run lint

@brunocalou
Copy link
Author

Hey guys, the CI is breaking on a Test step, but it runs perfectly on my machine.

Captura de Tela 2022-10-27 às 14 03 35

There is no error, just a Error: Process completed with exit code 1. message at the end. Any idea how to solve it?

@exseniorastronaut
Copy link

exseniorastronaut commented Nov 9, 2022

@Conduitry can you have a look at this please?

@baseballyama
Copy link
Member

Thank you for your contribution.

I think this fix doesn't solve the actual issue. Just hiding the issue.
And in my local environment, I'm getting a different error.
It means the fundamental issue is that the next event comes before the transition is complete.

I'm not sure how this can be resolved on the Svelte side.
Perhaps, in this case, we need to implement a way to disable the click events until the transition is complete in userland.

image

@benmccann benmccann changed the title [fix] Out transition function when config is undefined fix: out transition function when config is undefined Jan 12, 2023
@baseballyama
Copy link
Member

According to this comment, this referred issue was fixed, so I close this PR.
Thank you for your contribution.

#7904 (comment)

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

Successfully merging this pull request may close these issues.

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'tick')
3 participants