diff options
author | Sheogorath | 2018-03-18 03:06:11 +0100 |
---|---|---|
committer | Sheogorath | 2018-03-18 03:11:28 +0100 |
commit | 621996289212694f37c7e6513d215818940d2b6b (patch) | |
tree | 9da63ace070bc5c6c29470f045625fc9ec1d3152 /public | |
parent | 41bf7cc52faff91efa9303e29fae631f5c1a1476 (diff) |
Reorganize usage of `getAsFile()`
Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
Diffstat (limited to '')
-rw-r--r-- | public/vendor/inlineAttachment/inline-attachment.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/public/vendor/inlineAttachment/inline-attachment.js b/public/vendor/inlineAttachment/inline-attachment.js index e927c428..5c7c7166 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); + } } } } |