Skip to content

Commit 233991f

Browse files
committed
fix error in ReactViewGroup
1 parent 5d887e7 commit 233991f

File tree

1 file changed

+4
-2
lines changed
  • packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view

1 file changed

+4
-2
lines changed

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,8 @@ public void onViewAdded(View child) {
649649

650650
@Override
651651
public void onViewRemoved(View child) {
652+
Object nativeId = child.getTag(R.id.view_tag_native_id);
653+
652654
try {
653655
Object childNativeId = child.getTag(R.id.view_tag_native_id);
654656
if (nativeId instanceof String) {
@@ -657,11 +659,11 @@ public void onViewRemoved(View child) {
657659
.anyMatch(nativeID::equals);
658660
if (matches) {
659661
String stackTrace = android.util.Log.getStackTraceString(new Throwable());
660-
FLog.e(ReactConstants.TAG, "onViewRemoved of one of the tracked children: " + nativeID + " with stack trace: " + "\n" + stackTrace);
662+
FLog.e(TAG, "onViewRemoved of one of the tracked children: " + nativeID + " with stack trace: " + "\n" + stackTrace);
661663
}
662664
}
663665
} catch (Exception e) {
664-
FLog.e(ReactConstants.TAG, "Exception in getting onViewRemoved info: " + e.getMessage());
666+
FLog.e(TAG, "Exception in getting onViewRemoved info: " + e.getMessage());
665667
}
666668

667669
UiThreadUtil.assertOnUiThread();

0 commit comments

Comments
 (0)