Skip to content
Snippets Groups Projects
Commit 2b3ad9bf authored by Achraf (abz)'s avatar Achraf (abz)
Browse files

[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: default avatarAlexandre Kühn (aku) <aku@odoo.com>
parent 62cd2c0b
Branches
Tags
No related merge requests found
......@@ -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 });
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment