|
@@ -1,8 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
-module.exports = function supportsUploadProgress () {
|
|
|
- const userAgent = typeof navigator !== 'undefined' ? navigator.userAgent : null
|
|
|
+module.exports = function supportsUploadProgress (userAgent) {
|
|
|
+
|
|
|
+ if (userAgent == null) {
|
|
|
+ userAgent = typeof navigator !== 'undefined' ? navigator.userAgent : null
|
|
|
+ }
|
|
|
|
|
|
if (!userAgent) return true
|
|
|
|
|
@@ -10,7 +13,9 @@ module.exports = function supportsUploadProgress () {
|
|
|
if (!m) return true
|
|
|
|
|
|
const edgeVersion = m[1]
|
|
|
- const [major, minor] = edgeVersion.split('.')
|
|
|
+ let [major, minor] = edgeVersion.split('.')
|
|
|
+ major = parseInt(major, 10)
|
|
|
+ minor = parseInt(minor, 10)
|
|
|
|
|
|
|
|
|
|
|
@@ -21,7 +26,7 @@ module.exports = function supportsUploadProgress () {
|
|
|
|
|
|
|
|
|
|
|
|
- if (major > 18 || (major === 18 && minor > 18218)) {
|
|
|
+ if (major > 18 || (major === 18 && minor >= 18218)) {
|
|
|
return true
|
|
|
}
|
|
|
|