fix var name

This commit is contained in:
Victor Wads 2022-06-07 23:25:23 -03:00
parent 7645becb41
commit b0115b9953

View file

@ -268,16 +268,16 @@ class ReceiveDialog extends Dialog {
return return
} }
let mine = file.mime.split('/')[0] let mime = file.mime.split('/')[0]
let previewElement = { let previewElement = {
image: 'img', image: 'img',
audio: 'audio', audio: 'audio',
video: 'video' video: 'video'
} }
if(Object.keys(previewElement).indexOf(mine) !== -1){ if(Object.keys(previewElement).indexOf(mime) !== -1){
console.log('the file is able to preview'); console.log('the file is able to preview');
let element = document.createElement(previewElement[mine]); let element = document.createElement(previewElement[mime]);
element.src = url; element.src = url;
element.controls = true; element.controls = true;
element.classList = 'element-preview' element.classList = 'element-preview'