diff --git a/public/vendor/inlineAttachment/inline-attachment.js b/public/vendor/inlineAttachment/inline-attachment.js index e927c42..5c7c716 100644 --- a/public/vendor/inlineAttachment/inline-attachment.js +++ b/public/vendor/inlineAttachment/inline-attachment.js @@ -370,8 +370,11 @@ if (this.isFileAllowed(item)) { result = true; var id = ID(); - this.onFileInserted(item.getAsFile(), id); - this.uploadFile(item.getAsFile(), id); + var file = item.getAsFile(); + if (file !== null) { + this.onFileInserted(file, id); + this.uploadFile(file, id); + } } } }