summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorXavier Morel <xmo@openerp.com>2013-12-02 16:10:37 +0100
committerXavier Morel <xmo@openerp.com>2013-12-02 16:10:37 +0100
commit0dff8277ccb20c6673b2a3013d2cb3d6e330e56c (patch)
tree26c74aa803516a16e684485f2a25c9a1c75b9492 /addons/web/static/src
parent753cb318040fc29995f5397b63ad9cc42a03cd90 (diff)
[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
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/search.js5
1 files changed, 4 insertions, 1 deletions
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];
}