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(platform-browser): take serialization into account for empty check of transfer state #47710

Closed
wants to merge 1 commit into from

Conversation

Jakob-em
Copy link

@Jakob-em Jakob-em commented Oct 8, 2022

Transfer states with no keys and only serialization callbacks were previously treated as empty which lead to no script getting embedded to transfer the state from the server to the client.

PR Checklist

Please check if your PR fulfills the following requirements:

I am not sure if there is anything in the docs that needs to be updated.

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

When no key is present in the transfer state and serialization callbacks are registered, these callbacks are never called as the state is treated as empty and toJson is therefore not called on the server side.

Issue Number: N/A

What is the new behavior?

Transfer states without keys and serialization callbacks are now treated as non empty which allows them to be send from the server to the client.

Does this PR introduce a breaking change?

  • Yes
  • No
    Considering the current behaviour being not very logical and probably not intended I would not consider this change a breaking change.

…k of transfer state

Transfer states with no keys and only serialization callbacks were previously treated as empty which lead to no script getting embedded to transfer the state from the server to the client.
@pullapprove pullapprove bot requested a review from alxhub October 8, 2022 22:14
@jessicajaniuk jessicajaniuk added the area: core Issues related to the framework runtime label Oct 10, 2022
@ngbot ngbot bot added this to the Backlog milestone Oct 10, 2022
@AndrewKushnir AndrewKushnir requested review from AndrewKushnir and removed request for alxhub October 10, 2022 22:34
@alan-agius4
Copy link
Contributor

Hi @Jakob-em,

by the looks of it, the issue that you are trying to fix has been reported in #47172. Unfortunately, this is not the right place to tackle this problem. I have a PR in flight that addresses the issue.

None-the-less, thank you for your contribution.

@Jakob-em
Copy link
Author

Thanks for the update @alan-agius4. I was not sure if this should be handled here or on the usage side. Glad to see the issue is fixed with your PR 👍🏻

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Nov 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: core Issues related to the framework runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants