From 8c0e0d8a38f7353a0917fedec041b90323067114 Mon Sep 17 00:00:00 2001 From: Frontier Fang Date: Fri, 4 Aug 2017 14:12:51 +0800 Subject: [PATCH] [FIX] Fix avatar upload fail on Cordova app --- packages/rocketchat-ui-account/client/avatar/prompt.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/rocketchat-ui-account/client/avatar/prompt.js b/packages/rocketchat-ui-account/client/avatar/prompt.js index 6fdd1bdcc5f3..391a8c016214 100644 --- a/packages/rocketchat-ui-account/client/avatar/prompt.js +++ b/packages/rocketchat-ui-account/client/avatar/prompt.js @@ -85,7 +85,8 @@ Template.avatarPrompt.events({ files = event.dataTransfer && event.dataTransfer.files || []; } - for (const file of files) { + for (let i = 0; i < files.length; i++) { + const file = files[i]; Object.defineProperty(file, 'type', { value: mime.lookup(file.name) }); }