You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by GitBox <gi...@apache.org> on 2019/01/08 07:13:32 UTC

[GitHub] YorkShen closed pull request #1968: [WEEX][Android] When View Not InstanceOf WXGestureObservable, mGestureType is Null, remove event has none affect,

YorkShen closed pull request #1968: [WEEX][Android] When View Not InstanceOf WXGestureObservable, mGestureType is Null, remove event has none affect,
URL: https://github.com/apache/incubator-weex/pull/1968
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
index b926b956cf..93635f62f2 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/WXComponent.java
@@ -1501,16 +1501,19 @@ public void removeEvent(String type) {
     if (TextUtils.isEmpty(type)) {
       return;
     }
-    if (getEvents() == null || mAppendEvents == null || mGestureType == null) {
-      return;
-    }
 
     if (type.equals(Constants.Event.LAYEROVERFLOW))
       removeLayerOverFlowListener(getRef());
 
-    getEvents().remove(type);
-    mAppendEvents.remove(type);//only clean append events, not dom's events.
-    mGestureType.remove(type);
+    if(getEvents() != null){
+      getEvents().remove(type);
+    }
+    if(mAppendEvents != null) {
+      mAppendEvents.remove(type);//only clean append events, not dom's events.
+    }
+    if(mGestureType != null){
+      mGestureType.remove(type);
+    }
     removeEventFromView(type);
   }
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services