projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
080b473
)
[FIX] use _.isEmpty instead of Object.keys
author
Géry Debongnie
<ged@odoo.com>
Fri, 30 May 2014 09:33:56 +0000
(11:33 +0200)
committer
Géry Debongnie
<ged@odoo.com>
Fri, 30 May 2014 09:33:56 +0000
(11:33 +0200)
Object.keys is not supported by all browsers (*cough* IE *cough*).
Also, bonus, isEmpty is more readable and more 'semantic'
addons/web/static/src/js/search.js
patch
|
blob
|
history
diff --git
a/addons/web/static/src/js/search.js
b/addons/web/static/src/js/search.js
index
a98b42d
..
bce4fc6
100644
(file)
--- a/
addons/web/static/src/js/search.js
+++ b/
addons/web/static/src/js/search.js
@@
-1819,7
+1819,7
@@
instance.web.search.CustomReports = instance.web.search.Input.extend({
$filter.remove();
delete self.$filters[key];
delete self.filters[key];
- if (!Object.keys(self.filters).length) {
+ if (_.isEmpty(self.filters)) {
self.hide();
}
});