Просмотр исходного кода

remove `startsWith`, because its ES6 and needs polyfills

Artur Paikin 7 лет назад
Родитель
Сommit
d37aee305e
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/core/Core.js

+ 1 - 1
src/core/Core.js

@@ -331,7 +331,7 @@ class Uppy {
         }
         }
 
 
         // otherwise this is likely an extension
         // otherwise this is likely an extension
-        if (type.startsWith('.') > -1) {
+        if (type[0] === '.') {
           if (file.extension === type.substr(1)) {
           if (file.extension === type.substr(1)) {
             return file.extension
             return file.extension
           }
           }