From 4b39d61ff46c9edaa18999a5ef5b7d6054965977 Mon Sep 17 00:00:00 2001 From: Danny Coates Date: Tue, 29 Aug 2017 11:20:34 -0700 Subject: [PATCH] don't upload empty files --- app/templates/welcome.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/templates/welcome.js b/app/templates/welcome.js index da7e753f..d15270ac 100644 --- a/app/templates/welcome.js +++ b/app/templates/welcome.js @@ -44,6 +44,9 @@ module.exports = function(state, emit) { event.preventDefault(); const target = event.target; const file = target.files[0]; + if (file.size === 0) { + return; + } await fadeOut('page-one'); emit('upload', { file, type: 'click' }); }