summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/models/message/message.js
diff options
context:
space:
mode:
authorSébastien Theys <seb@odoo.com>2020-09-22 16:25:24 +0000
committerSébastien Theys <seb@odoo.com>2020-09-23 09:52:30 +0000
commitf6e67650e8cb1f8f0be9e90dbaccf45692816c3e (patch)
tree1e08313ef69bfe827c321161e05ac44e27c8ca8b /addons/mail/static/src/models/message/message.js
parentbc00059bcd1c6475b00503e9242edd6547dbd93d (diff)
[FIX] mail: ignore `undefined` in JS fields create/write
Passing a field containing `undefined` should lead to the same result as not passing the field. Fields that relied on `undefined` as a value have been changed to use the newly introduced `clear` command, that resets a field to its default value (often that is equal to `undefined`). task-2336491 closes odoo/odoo#58308 X-original-commit: b18824485483564d2ab80f41914a3548aa528ae0 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Diffstat (limited to 'addons/mail/static/src/models/message/message.js')
-rw-r--r--addons/mail/static/src/models/message/message.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/mail/static/src/models/message/message.js b/addons/mail/static/src/models/message/message.js
index 2c3e3b53c91..f375294666c 100644
--- a/addons/mail/static/src/models/message/message.js
+++ b/addons/mail/static/src/models/message/message.js
@@ -387,7 +387,7 @@ function factory(dependencies) {
* @returns {boolean}
*/
_computeIsCurrentPartnerAuthor() {
- return (
+ return !!(
this.author &&
this.messagingCurrentPartner &&
this.messagingCurrentPartner === this.author