Skip to content
This repository was archived by the owner on Jun 3, 2021. It is now read-only.

Commit 945e93b

Browse files
lucky-chenYorkShen
authored andcommitted
* [Android] try to fix js exception: scroll event.xxx is undefined (#2034)
1 parent 037c758 commit 945e93b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

android/sdk/src/main/java/com/taobao/weex/ui/component/helper/ScrollStartEndHelper.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,10 @@ public void onScrolled(int x, int y){
6666
this.y = y;
6767
if(!hasStart){
6868
if(component.getEvents().contains(Constants.Event.SCROLL_START)){
69-
component.fireEvent(Constants.Event.SCROLL_START, getScrollEvent(x, y));
69+
Map<String, Object> event = getScrollEvent(x,y);
70+
if (null !=event && !event.isEmpty()){
71+
component.fireEvent(Constants.Event.SCROLL_START,event);
72+
}
7073
}
7174
hasStart = true;
7275
}

0 commit comments

Comments
 (0)