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

Don't update view tag when null #6353

Merged
merged 4 commits into from
Aug 13, 2024
Merged

Conversation

j-piasecki
Copy link
Member

Summary

setLocalRef may be called with null being passed as the argument. This is handled by the conditional in the logic related to layout animations but not when updating the component view tag. There may be cases where component view tag will become null and will be passed to removePropsFromRegistry, which will then crash on the native side as it assumes it will receive an array of numbers.

Assuming this is the correct way to handle this (is it possible that assigning null to view tag is expected here?), then the code may be changed slightly not to repeat the same check and do an early return. Let me know if you prefer that.

Test plan

Just trust me

(I don't have any other reproduction than the Expensify App on the 0.74 upgrade branch (with strict mode enabled, without it everything works) 😞)

@j-piasecki j-piasecki added this pull request to the merge queue Aug 13, 2024
Merged via the queue into main with commit f8f7777 Aug 13, 2024
8 checks passed
@j-piasecki j-piasecki deleted the @jpiasecki/fix-null-viewtag branch August 13, 2024 08:06
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.

2 participants