summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/models/thread/thread.js
diff options
context:
space:
mode:
authorSébastien Theys <seb@odoo.com>2020-10-07 15:47:14 +0000
committerSébastien Theys <seb@odoo.com>2020-10-08 12:53:17 +0000
commit50805a2e15841753f2d4302527ba00ec4c90edb1 (patch)
tree8511d0ff765766cf57b4a4b6ca622eeafd714603 /addons/mail/static/src/models/thread/thread.js
parent9f1280e275fd851fce17bf82c603fdc50a8ef94e (diff)
[FIX] mail: avoid useless (un)link when using replace
Side effect of this change: dependencies are not longer triggered when replace is not actually doing anything. task-2270780 closes odoo/odoo#59508 X-original-commit: 75a44675873d65fdf17f2205772b05a0f59bb42c Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Diffstat (limited to 'addons/mail/static/src/models/thread/thread.js')
-rw-r--r--addons/mail/static/src/models/thread/thread.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/mail/static/src/models/thread/thread.js b/addons/mail/static/src/models/thread/thread.js
index 70912503dce..d50fca3e3f4 100644
--- a/addons/mail/static/src/models/thread/thread.js
+++ b/addons/mail/static/src/models/thread/thread.js
@@ -287,6 +287,9 @@ function factory(dependencies) {
}
return list;
}, []);
+ if (channelIds.length === 0) {
+ return;
+ }
const channelPreviews = await this.env.services.rpc({
model: 'mail.channel',
method: 'channel_fetch_preview',