git ssb

0+

ev / microbay



forked from Dominic / patchbay

Commit 4689a245257fb4fbdda64f8199082f40541fdee4

Handle file input cancelled

If no file is selected, abort processing
Charles Lehner committed on 9/9/2016, 4:19:49 PM
Parent: 254d428707404f153d5ee3cb7519467096be0cc7

Files changed

modules/file-input.jschanged
modules/file-input.jsView
@@ -12,8 +12,9 @@
1212
1313 return h('input', { type: 'file',
1414 onchange: function (ev) {
1515 var file = ev.target.files[0]
16+ if (!file) return
1617 var reader = new FileReader()
1718 reader.onload = function () {
1819 pull(
1920 pull.values(split(new Buffer(reader.result), 64*1024)),

Built with git-ssb-web