From 0dff8277ccb20c6673b2a3013d2cb3d6e330e56c Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Mon, 2 Dec 2013 16:10:37 +0100 Subject: [PATCH] [FIX] breakage due to backbone change: in 1.0+, this.reset() will call this.add() in 0.9, this.add would only be called if items were provided to reset(), changed in commit cf6e862. bzr revid: xmo@openerp.com-20131202151037-xxmvu5790p2jsxz6 --- addons/web/static/src/js/search.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/web/static/src/js/search.js b/addons/web/static/src/js/search.js index fcfcfb08f8e..83eaecd845a 100644 --- a/addons/web/static/src/js/search.js +++ b/addons/web/static/src/js/search.js @@ -71,7 +71,10 @@ my.SearchQuery = B.Collection.extend({ }, add: function (values, options) { options = options || {}; - if (!(values instanceof Array)) { + + if (!values) { + values = []; + } else if (!(values instanceof Array)) { values = [values]; }