From b0115b995302edc28cbe078d7d2eb7d956c06d59 Mon Sep 17 00:00:00 2001 From: Victor Wads Date: Tue, 7 Jun 2022 23:25:23 -0300 Subject: [PATCH] fix var name --- client/scripts/ui.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/scripts/ui.js b/client/scripts/ui.js index 96ba911..2391daf 100644 --- a/client/scripts/ui.js +++ b/client/scripts/ui.js @@ -268,16 +268,16 @@ class ReceiveDialog extends Dialog { return } - let mine = file.mime.split('/')[0] + let mime = file.mime.split('/')[0] let previewElement = { image: 'img', audio: 'audio', video: 'video' } - if(Object.keys(previewElement).indexOf(mine) !== -1){ + if(Object.keys(previewElement).indexOf(mime) !== -1){ console.log('the file is able to preview'); - let element = document.createElement(previewElement[mine]); + let element = document.createElement(previewElement[mime]); element.src = url; element.controls = true; element.classList = 'element-preview'