diff --git a/bigbluebutton-html5/imports/ui/components/presentation/presentation-toast/presentation-uploader-toast/component.jsx b/bigbluebutton-html5/imports/ui/components/presentation/presentation-toast/presentation-uploader-toast/component.jsx index af2e2cf719..bd8de39c81 100644 --- a/bigbluebutton-html5/imports/ui/components/presentation/presentation-toast/presentation-uploader-toast/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/presentation/presentation-toast/presentation-uploader-toast/component.jsx @@ -58,7 +58,7 @@ const intlMessages = defineMessages({ }, SCAN_FAILED: { id: 'app.presentationUploder.upload.scanFailed', - description: 'error that the file could not be uploaded because scanning failed' + description: 'error that the file could not be uploaded because scanning failed', }, CONVERSION_TIMEOUT: { id: 'app.presentationUploder.conversion.conversionTimeout', @@ -487,11 +487,12 @@ export const PresentationUploaderToast = ({ }); }, [presentations]); - let activeToast = Session.getItem('presentationUploaderToastId'); + const activeToast = Session.getItem('presentationUploaderToastId'); + const showToast = convertingPresentations.length > 0; - if (showToast && !activeToast) { - activeToast = toast.info(() => renderToastList(convertingPresentations, intl), { + if (showToast && !toast.isActive(activeToast)) { + const convertingPresToast = toast.info(() => renderToastList(convertingPresentations, intl), { hideProgressBar: true, autoClose: false, newestOnTop: true, @@ -501,7 +502,7 @@ export const PresentationUploaderToast = ({ Session.setItem('presentationUploaderToastId', null); }, }); - Session.setItem('presentationUploaderToastId', activeToast); + Session.setItem('presentationUploaderToastId', convertingPresToast); } else if (!showToast && activeToast) { handleDismissToast(activeToast); } else {