mirror of
https://github.com/codex-team/editor.js
synced 2024-06-16 04:35:50 +02:00
improved after review
This commit is contained in:
parent
a392cdcaf6
commit
72346e4773
|
@ -301,11 +301,11 @@ var image = (function(image) {
|
||||||
var input = codex.transport.input,
|
var input = codex.transport.input,
|
||||||
files = input.files;
|
files = input.files;
|
||||||
|
|
||||||
var _validFileExtensions = ["jpg", "jpeg", "bmp", "gif", "png"];
|
var validFileExtensions = ["jpg", "jpeg", "bmp", "gif", "png"];
|
||||||
|
|
||||||
var type = files[0].type.split('/');
|
var type = files[0].type.split('/');
|
||||||
|
|
||||||
var result = _validFileExtensions.some(function(ext) {
|
var result = validFileExtensions.some(function(ext) {
|
||||||
return ext == type[1]
|
return ext == type[1]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue