瀏覽代碼

Fix concurrent modification exception when switching root

Guy Carmeli 8 年之前
父節點
當前提交
04ad06ca11
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. 1
    1
      android/app/src/main/java/com/reactnativenavigation/events/EventBus.java

+ 1
- 1
android/app/src/main/java/com/reactnativenavigation/events/EventBus.java 查看文件

@@ -21,7 +21,7 @@ public enum EventBus {
21 21
             WeakReference<Subscriber> ref = iterator.next();
22 22
             Subscriber registered = ref.get();
23 23
             if (registered != null && registered == subscriber) {
24
-                subscribers.remove(ref);
24
+                iterator.remove();
25 25
             }
26 26
         }
27 27
     }