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
This commit is contained in:
Joshua Gross 2020-10-01 04:49:15 -07:00 коммит произвёл Facebook GitHub Bot
Родитель dd35bf534c
Коммит 030d2c1931
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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