Skip to content

Commit

Permalink
activity-iterator: convert float to int to support json number as set…
Browse files Browse the repository at this point in the history
…ting
  • Loading branch information
Frank Martinez committed Feb 1, 2018
1 parent 5b758f2 commit 757754f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions model/simple/iterator.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ func (tb *SimpleIteratorTaskBehavior) Eval(context model.TaskContext, evalCode i
case int:
count := iterateOn.(int)
itx = NewIntIterator(count)
case float64:
count := int(iterateOn.(float64))
itx = NewIntIterator(count)
case map[string]interface{}:
itx = NewObjectIterator(t)
case []interface{}:
Expand Down

0 comments on commit 757754f

Please sign in to comment.