Skip to content
Snippets Groups Projects
Commit 791a38a6 authored by Denis Vermylen's avatar Denis Vermylen
Browse files

[FIX] web: qweb2: allow null values in a foreach iteration


Before this commit iteration in a t-foreach containing null or
undefined values crashed because they have no attributes.

closes odoo/odoo#31828

Signed-off-by: default avatarFabien Meghazi <amigrave@users.noreply.github.com>
parent 79d5d57d
No related branches found
No related tags found
No related merge requests found
......@@ -173,7 +173,7 @@ var QWeb2 = {
new_dict[as_first] = index === 0;
new_dict[as_last] = index + 1 === size;
new_dict[as_parity] = (index % 2 == 1 ? 'odd' : 'even');
if (cur.constructor === Object) {
if (cur && cur.constructor === Object) {
this.extend(new_dict, cur);
}
new_dict[as] = cur;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment