From 030d2c1931fb9ff97f682343914503a1c359e1c4 Mon Sep 17 00:00:00 2001 From: Joshua Gross Date: Thu, 1 Oct 2020 04:49:15 -0700 Subject: [PATCH] Fix TextInput crash in non-Fabric Summary: This is a check to execute code only in Fabric, and... it's just wrong. This object is *always* present, for Fabric and non-Fabric. We instead need to check if there's actually a state object, as other parts of the code check for. Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D24042677 fbshipit-source-id: 5cf6ebc8f07987d917fdf11042d1715876fa8229 --- .../java/com/facebook/react/views/textinput/ReactEditText.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java index 570dd1f2fe0..d8bac9ffb79 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java +++ b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java @@ -936,7 +936,7 @@ public class ReactEditText extends AppCompatEditText */ private void updateCachedSpannable(boolean resetStyles) { // Noops in non-Fabric - if (getFabricViewStateManager() == null) { + if (mFabricViewStateManager.hasStateWrapper()) { return; } // If this view doesn't have an ID yet, we don't have a cache key, so bail here