From 6ccc41fe2bba7c485955e9ea9a3a470cfc6edff4 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Mon, 22 Aug 2011 12:56:56 +0200 Subject: [PATCH] [FIX] insertion at end: 'null' index should be same as 'undefined' for 'at' kwarg to Collection.add bzr revid: xmo@openerp.com-20110822105656-f0x1iweoxbh8hcgu --- addons/base/static/src/js/list.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/base/static/src/js/list.js b/addons/base/static/src/js/list.js index 689c65b492f..c6e50de85ec 100644 --- a/addons/base/static/src/js/list.js +++ b/addons/base/static/src/js/list.js @@ -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);