Commit 6793f5c
Fix RCTDevLoadingView crash when adding button constraints (#54690)
Summary:
Pull Request resolved: #54690
Changelog:
[iOS][Fixed] - Fixed crash from dismiss button in DevLoadingView
D86420230 added a dismiss button feature to RCTDevLoadingView. However, when adding layout constraints on line 198, it incorrectly checked the `dismissButton` parameter instead of the `self->_dismissButton` instance variable. This caused NSLayoutConstraint crashes when the parameter was nil/false but the instance variable existed from a previous call, or vice versa.
This changes line 198 to check `self->_dismissButton` (the instance variable) instead of `dismissButton` (the function parameter) to properly verify if the button exists before adding constraints to it.
Reviewed By: vzaidman, javache
Differential Revision: D87871856
fbshipit-source-id: c8fe033bce383c2589041c9cd3fad65f37553d3c1 parent e23e9ad commit 6793f5c
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
| 198 | + | |
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
| |||
0 commit comments