summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorChristoph (Sheogorath) Kern2018-03-21 14:15:04 +0100
committerGitHub2018-03-21 14:15:04 +0100
commitfa4a8418afc57a45f71471ca7fd1adcd4d8d4cd4 (patch)
treed1f70c96b0c88ad9e38a1f0d2c97251f28aebf7c /public
parent6485f9665976adfc3dc17233c1922efb89e5d43a (diff)
parent621996289212694f37c7e6513d215818940d2b6b (diff)
Merge pull request #772 from SISheogorath/fix/chromeFileError
Some fixes for inline-Attachments in Codemirror
Diffstat (limited to 'public')
-rw-r--r--public/vendor/inlineAttachment/inline-attachment.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/public/vendor/inlineAttachment/inline-attachment.js b/public/vendor/inlineAttachment/inline-attachment.js
index d9503d62..5c7c7166 100644
--- a/public/vendor/inlineAttachment/inline-attachment.js
+++ b/public/vendor/inlineAttachment/inline-attachment.js
@@ -131,7 +131,7 @@
* Extension which will be used when a file extension could not
* be detected
*/
- defualtExtension: 'png',
+ defaultExtension: 'png',
/**
* JSON field which refers to the uploaded file URL
@@ -220,7 +220,7 @@
xhr = new XMLHttpRequest(),
id = id,
settings = this.settings,
- extension = settings.defualtExtension;
+ extension = settings.defaultExtension;
if (typeof settings.setupFormData === 'function') {
settings.setupFormData(formData, file);
@@ -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);
+ }
}
}
}