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: remove top level is_fabric check #5779

Merged
merged 1 commit into from
Mar 12, 2024

Conversation

WoLewicki
Copy link
Member

@WoLewicki WoLewicki commented Mar 11, 2024

Summary

PR removing top level check for isFabric since it should be evaluated after it is added to global which may not be done at that point.

Test plan

Copy link
Member

@tomekzaw tomekzaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@piaskowyk piaskowyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we be certain that on the very first call to one of those functions, isFabric() will return the correct value?

@WoLewicki
Copy link
Member Author

@piaskowyk I don't think so, I am not fully aware when those checks are used and if they are used before this line:

rnRuntime.global().setProperty(rnRuntime, "_IS_FABRIC", isFabric);
is evaluated then it will not work. I think it is still better than having it in top-level scope.

@WoLewicki WoLewicki added this pull request to the merge queue Mar 12, 2024
Merged via the queue into main with commit 85999bf Mar 12, 2024
8 checks passed
@WoLewicki WoLewicki deleted the @wolewicki/remove-top-level-is-fabric branch March 12, 2024 09:28
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.

None yet

3 participants