diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-03-01 16:14:41 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-03-01 16:14:41 +0100 |
| commit | eddefc9948b1a56bfc72e4c54fee09f8954331fd (patch) | |
| tree | a4e7ad831e22ca61f898a83a1e0e718c071b6511 /addons/web/static/lib | |
| parent | b150ac3203a6b156335745a2ff81f7278a42f68b (diff) | |
| parent | 8c55e57c7ff2bd25df6e76608f77bab1dedd26cf (diff) | |
[MERGE] forward port branch 10.0 up to 8c55e57c7ff
Diffstat (limited to 'addons/web/static/lib')
| -rw-r--r-- | addons/web/static/lib/qweb/qweb2.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/addons/web/static/lib/qweb/qweb2.js b/addons/web/static/lib/qweb/qweb2.js index d5449dae6d9..1ea73e6278e 100644 --- a/addons/web/static/lib/qweb/qweb2.js +++ b/addons/web/static/lib/qweb/qweb2.js @@ -153,14 +153,15 @@ var QWeb2 = { foreach: function(context, enu, as, old_dict, callback) { if (enu != null) { var index, jlen, cur; - var size, new_dict = this.extend({}, old_dict); + var new_dict = this.extend({}, old_dict); new_dict[as + "_all"] = enu; var as_value = as + "_value", as_index = as + "_index", as_first = as + "_first", as_last = as + "_last", as_parity = as + "_parity"; - if (size = enu.length) { + if (enu instanceof Array) { + var size = enu.length; new_dict[as + "_size"] = size; for (index = 0, jlen = enu.length; index < jlen; index++) { cur = enu[index]; |
