diff --git a/src/model.js b/src/model.js index 37c1ed7e0e..167f4206c2 100644 --- a/src/model.js +++ b/src/model.js @@ -151,8 +151,8 @@ return record; }; array.add = function(record, position) { - if (position === undefined) { - position = -1; + if ((position === undefined) || (position == -1)) { + position = this.length; } if (record.group != this) { record.group = this;