Skip to content

fix(core): handle elements with local refs in event replay serialization logic#56076

Closed
AndrewKushnir wants to merge 1 commit intoangular:mainfrom
AndrewKushnir:fix_56073
Closed

fix(core): handle elements with local refs in event replay serialization logic#56076
AndrewKushnir wants to merge 1 commit intoangular:mainfrom
AndrewKushnir:fix_56073

Conversation

@AndrewKushnir
Copy link
Contributor

Previously, the event replay serialization logic was located before we verify that a TNode exists. TNodes may not exist in tView.data array in several cases, including cases when there is a local ref used on an element: in this case an extra slot in LView contains a reference to the same element and TNode is not needed. This commit moves the event replay serialization logic a bit lower, after we check for TNode presence.

Resolves #56073.

PR Type

What kind of change does this PR introduce?

  • Bugfix

Does this PR introduce a breaking change?

  • Yes
  • No

…ion logic

Previously, the event replay serialization logic was located before we verify that a `TNode` exists. `TNode`s may not exist in `tView.data` array in several cases, including cases when there is a local ref used on an element: in this case an extra slot in `LView` contains a reference to the same element and `TNode` is not needed. This commit moves the event replay serialization logic a bit lower, after we check for TNode presence.

Resolves angular#56073.
@AndrewKushnir AndrewKushnir added action: review The PR is still awaiting reviews from at least one requested reviewer area: core Issues related to the framework runtime target: patch This PR is targeted for the next patch release core: hydration core: event dispatch labels May 24, 2024
@AndrewKushnir AndrewKushnir requested a review from iteriani May 24, 2024 22:10
@ngbot ngbot bot added this to the Backlog milestone May 24, 2024
@AndrewKushnir AndrewKushnir added action: presubmit The PR is in need of a google3 presubmit and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels May 25, 2024
@AndrewKushnir
Copy link
Contributor Author

Presubmit.

@AndrewKushnir AndrewKushnir added action: merge The PR is ready for merge by the caretaker merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note and removed action: presubmit The PR is in need of a google3 presubmit labels May 27, 2024
@AndrewKushnir
Copy link
Contributor Author

AndrewKushnir commented May 27, 2024

Caretaker note: an existing approval should be sufficient, this PR is ready for merge.

@pkozlowski-opensource
Copy link
Member

This PR was merged into the repository by commit ae83646.

pkozlowski-opensource pushed a commit that referenced this pull request May 27, 2024
…ion logic (#56076)

Previously, the event replay serialization logic was located before we verify that a `TNode` exists. `TNode`s may not exist in `tView.data` array in several cases, including cases when there is a local ref used on an element: in this case an extra slot in `LView` contains a reference to the same element and `TNode` is not needed. This commit moves the event replay serialization logic a bit lower, after we check for TNode presence.

Resolves #56073.

PR Close #56076
@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 Jun 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: core Issues related to the framework runtime core: event dispatch core: hydration merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

setJSActionAttribute: Cannot read properties of null (reading 'type')

3 participants