Fix sloppy boolean error that breaks certain Fabric TextInputs

Summary:
When I landed D24042677 (https://github.com/facebook/react-native/commit/030d2c1931fb9ff97f682343914503a1c359e1c4), I had the right idea in spirit but forgot to negate the if statement. Oops.

This means that in non-Fabric, the cached spannable will be updated (potentially causing a crash) and the cached spannable will *never* be updated, meaning that most TextInputs will be measured as 0 in Fabric.

Changelog: [Internal]

Reviewed By: sammy-SC

Differential Revision: D24119952

fbshipit-source-id: dc86137956535e1f2b147bb432d050b3561e2658
This commit is contained in:
Joshua Gross
2020-10-05 14:34:26 -07:00
committed by Facebook GitHub Bot
parent d4937b925b
commit 02005973ee
@@ -943,7 +943,7 @@ public class ReactEditText extends AppCompatEditText
*/
private void updateCachedSpannable(boolean resetStyles) {
// Noops in non-Fabric
if (mFabricViewStateManager.hasStateWrapper()) {
if (!mFabricViewStateManager.hasStateWrapper()) {
return;
}
// If this view doesn't have an ID yet, we don't have a cache key, so bail here