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] call onDestroy in SSR #6677

Merged
merged 1 commit into from
Aug 24, 2021
Merged

[fix] call onDestroy in SSR #6677

merged 1 commit into from
Aug 24, 2021

Conversation

dummdidumm
Copy link
Member

Via #6416, lifecycle hooks became noops for SvelteKit. But onDestroy is said to be called suring SSR according to the docs.

Fixes #6676

This PR goes this "fix" route of #6676 . Whether we switch that to "works as designed" for SvelteKit is up for discussion, therefore marking this PR as draft for now.

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

Via #6416, lifecycle hooks became noops for SvelteKit. But onDestroy is said to be called suring SSR according to the docs.

Fixes #6676
@dummdidumm dummdidumm marked this pull request as ready for review August 24, 2021 13:02
@dummdidumm dummdidumm merged commit 82419ce into master Aug 24, 2021
@dummdidumm dummdidumm deleted the fix-ssr-ondestroy branch August 24, 2021 13:03
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.

onDestroy hook not called on SSR since version 3.39.0 in production mode
2 participants