Skip to content

Commit 4fd77dc

Browse files
committed
fix error in ReactViewGroup
1 parent 5d887e7 commit 4fd77dc

File tree

1 file changed

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

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
package com.facebook.react.views.view;
99

1010
import static com.facebook.infer.annotation.Assertions.nullsafeFIXME;
11-
import static com.facebook.react.common.ReactConstants.TAG;
1211

1312
import android.annotation.SuppressLint;
1413
import android.annotation.TargetApi;
@@ -649,6 +648,8 @@ public void onViewAdded(View child) {
649648

650649
@Override
651650
public void onViewRemoved(View child) {
651+
Object nativeId = child.getTag(R.id.view_tag_native_id);
652+
652653
try {
653654
Object childNativeId = child.getTag(R.id.view_tag_native_id);
654655
if (nativeId instanceof String) {
@@ -657,11 +658,11 @@ public void onViewRemoved(View child) {
657658
.anyMatch(nativeID::equals);
658659
if (matches) {
659660
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);
661+
FLog.e(TAG, "onViewRemoved of one of the tracked children: " + nativeID + " with stack trace: " + "\n" + stackTrace);
661662
}
662663
}
663664
} catch (Exception e) {
664-
FLog.e(ReactConstants.TAG, "Exception in getting onViewRemoved info: " + e.getMessage());
665+
FLog.e(TAG, "Exception in getting onViewRemoved info: " + e.getMessage());
665666
}
666667

667668
UiThreadUtil.assertOnUiThread();

0 commit comments

Comments
 (0)