[FIX] mail: prevent a traceback when an onclick is triggered on an empty

m2o avater user widget

This commit's purpose is to prevent a traceback when the user click on
an empty avatar user icon.

task-3254564

closes odoo/odoo#117374

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit is contained in:
damr
2023-04-12 14:02:27 +02:00
parent 0651424113
commit bceab17e68
@@ -21,7 +21,9 @@ const userChatter = {
},
onClickAvatar() {
this.openChat(this.props.record.data[this.props.name][0]);
const id = this.props.record.data[this.props.name][0] ?? false
if (id !== false)
this.openChat(id);
},
};