소스 검색

Fixing Safari type error (#2207)

Ignacio G 5 년 전
부모
커밋
eb82c5c15a
1개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  1. 5 2
      packages/@uppy/aws-s3/src/index.js

+ 5 - 2
packages/@uppy/aws-s3/src/index.js

@@ -37,7 +37,9 @@ const qsStringify = require('qs-stringify')
 const MiniXHRUpload = require('./MiniXHRUpload')
 
 function resolveUrl (origin, link) {
-  return new URL_(link, origin).toString()
+  return origin
+    ? new URL_(link, origin).toString()
+    : new URL_(link).toString()
 }
 
 function isXml (content, xhr) {
@@ -160,7 +162,8 @@ module.exports = class AwsS3 extends Plugin {
     /**
      * keep track of `getUploadParameters()` responses
      * so we can cancel the calls individually using just a file ID
-     * @type {Object.<string, Promise>}
+     *
+     * @type {object.<string, Promise>}
      */
     const paramsPromises = Object.create(null)