Fix Group.add when index is -1

This commit is contained in:
Cédric Krier committed 2014-03-28 23:27:31 +01:00
1 parent 1ab35fad71
commit 23181a22d2
1 file changed
+2 -2
+2 -2
View File
@@ -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;