Skip to content

Commit 6219962

Browse files
committed
Reorganize usage of getAsFile()
Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
1 parent 41bf7cc commit 6219962

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

public/vendor/inlineAttachment/inline-attachment.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,8 +370,11 @@
370370
if (this.isFileAllowed(item)) {
371371
result = true;
372372
var id = ID();
373-
this.onFileInserted(item.getAsFile(), id);
374-
this.uploadFile(item.getAsFile(), id);
373+
var file = item.getAsFile();
374+
if (file !== null) {
375+
this.onFileInserted(file, id);
376+
this.uploadFile(file, id);
377+
}
375378
}
376379
}
377380
}

0 commit comments

Comments
 (0)