Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove warning when calling
measure
from RN runtime (software-mansi…
…on#4526) <!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please follow the template so that the reviewers can easily understand what the code changes affect. --> ## Summary This PR removes a warning that would trigger when `measure` function was called from the main RN runtime. The main motivation behind adding this `console.warn` was to force the developer to explicitly cover the case when `measure` is called from the RN runtime using `if (!_WORKLET) { ... }` guard, which, let's be honest, is quite uncomfortable. On the other hand, when measurement cannot be made, e.g. when called from the UI runtime but when the view is not mounted yet, `measure` returns `null`, which needs to be handled with `if (measured === null) { ... }`. It makes sense to merge these two cases since they can be handled identically. ## Test plan <!-- Provide a minimal but complete code snippet that can be used to test out this change along with instructions how to run it and a description of the expected behavior. -->
- Loading branch information