[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:
+3
-1
@@ -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);
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user