Skip to content

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.

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.

3 participants