diff options
| author | Achraf (abz) <abz@odoo.com> | 2021-05-04 09:34:40 +0000 |
|---|---|---|
| committer | Achraf (abz) <abz@odoo.com> | 2021-05-04 09:39:46 +0000 |
| commit | 2b3ad9bfa9459b8e39d769afa8fa61ceef925c75 (patch) | |
| tree | 298e0b86f4d4a0b3c165b8ab5ac5df0105162203 /addons/mail | |
| parent | 62cd2c0be63738f0bbefd62de5d025990e63824f (diff) | |
[FIX] mail: Allow to navigate quickly among the different attachments
What are the steps to reproduce your issue ?
1. Create a record and add two attachments
2. Navigate quickly between these attachments
What is currently happening ?
Traceback
TypeError: Cannot read property 'complete' of undefined
at AttachmentViewer._handleImageLoad (https://www.odoo.com/mail/static/src/components/attachment_viewer/attachment_viewer.js:163:20)
opw-2521901
closes odoo/odoo#70309
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Diffstat (limited to 'addons/mail')
| -rw-r--r-- | addons/mail/static/src/components/attachment_viewer/attachment_viewer.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/mail/static/src/components/attachment_viewer/attachment_viewer.js b/addons/mail/static/src/components/attachment_viewer/attachment_viewer.js index 1cd680df8b0..30755fd916b 100644 --- a/addons/mail/static/src/components/attachment_viewer/attachment_viewer.js +++ b/addons/mail/static/src/components/attachment_viewer/attachment_viewer.js @@ -160,7 +160,7 @@ class AttachmentViewer extends Component { const image = refs[`image_${this.attachmentViewer.attachment.id}`]; if ( this.attachmentViewer.attachment.fileType === 'image' && - !image.complete + (!image || !image.complete) ) { this.attachmentViewer.update({ isImageLoading: true }); } |
