Ver Fonte

refactor: replace deprecated String.prototype.substr() (#3600)

.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated

Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
CommanderRoot há 3 anos atrás
pai
commit
e960357dcf
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      packages/@uppy/core/src/Restricter.js

+ 1 - 1
packages/@uppy/core/src/Restricter.js

@@ -59,7 +59,7 @@ class Restricter {
 
         // otherwise this is likely an extension
         if (type[0] === '.' && file.extension) {
-          return file.extension.toLowerCase() === type.substr(1).toLowerCase()
+          return file.extension.toLowerCase() === type.slice(1).toLowerCase()
         }
         return false
       })