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/10 06:50:39 UTC

[GitHub] YorkShen commented on a change in pull request #2034: * [Android] try to fix js exception: scroll event.xxx is undefined

YorkShen commented on a change in pull request #2034: * [Android] try to fix js exception: scroll event.xxx is undefined
URL: https://github.com/apache/incubator-weex/pull/2034#discussion_r246650638
 
 

 ##########
 File path: android/sdk/src/main/java/com/taobao/weex/ui/component/helper/ScrollStartEndHelper.java
 ##########
 @@ -66,7 +66,10 @@ public void  onScrolled(int x, int y){
             this.y = y;
             if(!hasStart){
                 if(component.getEvents().contains(Constants.Event.SCROLL_START)){
-                    component.fireEvent(Constants.Event.SCROLL_START, getScrollEvent(x, y));
+                    Map<String, Object> event = getScrollEvent(x,y);
+                    if (null !=event && !event.isEmpty()){
+                        component.fireEvent(Constants.Event.SCROLL_START, getScrollEvent(x, y));
 
 Review comment:
   Replace `getScrollEvent(x, y)` by `event` ?

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