Skip to content

Commit de067d9

Browse files
committedApr 13, 2016
Merge branch 'dont-request-without-any-images' into develop
Conflicts: dist/js/bootstrap-markdown-editor.js
2 parents 47568fd + 21c506a commit de067d9

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed
 

‎dist/js/bootstrap-markdown-editor.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/bootstrap-markdown-editor.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,7 @@
7676
container.find('.md-input-upload').on('change', function() {
7777
var files = $(this).get(0).files;
7878

79-
if (files.length) {
80-
uploadFiles(defaults.uploadPath, $(this).get(0).files, editor, snippetManager, mdLoading);
81-
}
79+
uploadFiles(defaults.uploadPath, $(this).get(0).files, editor, snippetManager, mdLoading);
8280
});
8381

8482
container.on('dragenter', function (e) {
@@ -234,6 +232,9 @@
234232
};
235233

236234
function uploadFiles (url, files, editor, snippetManager, loading) {
235+
if (! files.length) {
236+
return;
237+
}
237238

238239
loading.show();
239240

0 commit comments

Comments
 (0)