Permalink
Browse files

* [android] fix invalid call scrollToElement when has not option param

  • Loading branch information...
misakuo committed Jun 21, 2017
1 parent 29fb9a8 commit 040c188914017eca385162c51bc51d3ff71266df
Showing with 3 additions and 1 deletion.
  1. +3 −1 android/sdk/src/main/java/com/taobao/weex/dom/action/Actions.java
@@ -103,7 +103,9 @@ public static Action get(String actionName,JSONArray args){
if (args == null) {
return null;
}
return new ScrollToElementAction(args.getString(0),args.getJSONObject(1));
String ref = args.size() >= 1 ? args.getString(0) : null;
JSONObject options = args.size() >= 2 ? args.getJSONObject(1) : null;
return new ScrollToElementAction(ref, options);
case ADD_RULE:
if (args == null) {
return null;

0 comments on commit 040c188

Please sign in to comment.