[FIX] insertion at end: 'null' index should be same as 'undefined' for 'at' kwarg to Collection.add
bzr revid: xmo@openerp.com-20110822105656-f0x1iweoxbh8hcgu
This commit is contained in:
@@ -1315,7 +1315,7 @@ var Collection = openerp.base.Class.extend(/** @lends Collection# */{
|
||||
var instance = (records[i] instanceof Record) ? records[i] : new Record(records[i]);
|
||||
instance.bind(null, this._onRecordEvent);
|
||||
this._byId[instance.get('id')] = instance;
|
||||
if (options.at === undefined) {
|
||||
if (options.at == undefined) {
|
||||
this.records.push(instance);
|
||||
if (!options.silent) {
|
||||
this.trigger('add', this, instance, this.records.length-1);
|
||||
|
||||
Reference in New Issue
Block a user