Skip to content

Commit

Permalink
修复带啊名容错
Browse files Browse the repository at this point in the history
  • Loading branch information
carsonxu committed Sep 5, 2022
1 parent 2ee0f64 commit b038089
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions dist/cos-js-sdk-v5.js
Original file line number Diff line number Diff line change
Expand Up @@ -7212,7 +7212,7 @@ module.exports = function(module) {
/*! exports provided: name, version, description, main, types, scripts, repository, keywords, author, license, bugs, homepage, dependencies, devDependencies, default */
/***/ (function(module) {

module.exports = JSON.parse("{\"name\":\"cos-js-sdk-v5\",\"version\":\"1.4.4\",\"description\":\"JavaScript SDK for [腾讯云对象存储](https://cloud.tencent.com/product/cos)\",\"main\":\"dist/cos-js-sdk-v5.js\",\"types\":\"index.d.ts\",\"scripts\":{\"server\":\"node server/sts.js\",\"dev\":\"cross-env NODE_ENV=development webpack -w --mode=development\",\"build\":\"cross-env NODE_ENV=production webpack --mode=production\",\"cos-auth.min.js\":\"uglifyjs ./demo/common/cos-auth.js -o ./demo/common/cos-auth.min.js -c -m\"},\"repository\":{\"type\":\"git\",\"url\":\"git+https://github.com/tencentyun/cos-js-sdk-v5.git\"},\"keywords\":[],\"author\":\"carsonxu\",\"license\":\"ISC\",\"bugs\":{\"url\":\"https://github.com/tencentyun/cos-js-sdk-v5/issues\"},\"homepage\":\"https://github.com/tencentyun/cos-js-sdk-v5#readme\",\"dependencies\":{\"@xmldom/xmldom\":\"^0.8.2\"},\"devDependencies\":{\"@babel/core\":\"7.17.9\",\"@babel/plugin-transform-runtime\":\"7.18.10\",\"@babel/preset-env\":\"7.16.11\",\"babel-loader\":\"8.2.5\",\"body-parser\":\"^1.18.3\",\"cross-env\":\"^5.2.0\",\"express\":\"^4.16.4\",\"qcloud-cos-sts\":\"^3.0.2\",\"request\":\"^2.87.0\",\"terser-webpack-plugin\":\"4.2.3\",\"webpack\":\"4.46.0\",\"webpack-cli\":\"4.10.0\"}}");
module.exports = JSON.parse("{\"name\":\"cos-js-sdk-v5\",\"version\":\"1.4.6\",\"description\":\"JavaScript SDK for [腾讯云对象存储](https://cloud.tencent.com/product/cos)\",\"main\":\"dist/cos-js-sdk-v5.js\",\"types\":\"index.d.ts\",\"scripts\":{\"server\":\"node server/sts.js\",\"dev\":\"cross-env NODE_ENV=development webpack -w --mode=development\",\"build\":\"cross-env NODE_ENV=production webpack --mode=production\",\"cos-auth.min.js\":\"uglifyjs ./demo/common/cos-auth.js -o ./demo/common/cos-auth.min.js -c -m\"},\"repository\":{\"type\":\"git\",\"url\":\"git+https://github.com/tencentyun/cos-js-sdk-v5.git\"},\"keywords\":[],\"author\":\"carsonxu\",\"license\":\"ISC\",\"bugs\":{\"url\":\"https://github.com/tencentyun/cos-js-sdk-v5/issues\"},\"homepage\":\"https://github.com/tencentyun/cos-js-sdk-v5#readme\",\"dependencies\":{\"@xmldom/xmldom\":\"^0.8.2\"},\"devDependencies\":{\"@babel/core\":\"7.17.9\",\"@babel/plugin-transform-runtime\":\"7.18.10\",\"@babel/preset-env\":\"7.16.11\",\"babel-loader\":\"8.2.5\",\"body-parser\":\"^1.18.3\",\"cross-env\":\"^5.2.0\",\"express\":\"^4.16.4\",\"qcloud-cos-sts\":\"^3.0.2\",\"request\":\"^2.87.0\",\"terser-webpack-plugin\":\"4.2.3\",\"webpack\":\"4.46.0\",\"webpack-cli\":\"4.10.0\"}}");

/***/ }),

Expand Down Expand Up @@ -8111,7 +8111,7 @@ function uploadFile(params, callback) {
}; // 上传链路

if (self.options.EnableTracker) {
var accelerate = self.options.UseAccelerate || self.options.Domain.includes('accelerate.');
var accelerate = self.options.UseAccelerate || self.options.Domain && self.options.Domain.includes('accelerate.');
params.tracker = new Tracker({
bucket: params.Bucket,
region: params.Region,
Expand Down Expand Up @@ -8206,7 +8206,7 @@ function uploadFiles(params, callback) {
TotalSize += FileSize; // 单个文件上传链路

if (self.options.EnableTracker) {
var accelerate = self.options.UseAccelerate || self.options.Domain.includes('accelerate.');
var accelerate = self.options.UseAccelerate || self.options.Domain && self.options.Domain.includes('accelerate.');
fileParams.tracker = new Tracker({
bucket: fileParams.Bucket,
region: fileParams.Region,
Expand Down
2 changes: 1 addition & 1 deletion dist/cos-js-sdk-v5.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cos-js-sdk-v5",
"version": "1.4.5",
"version": "1.4.6",
"description": "JavaScript SDK for [腾讯云对象存储](https://cloud.tencent.com/product/cos)",
"main": "dist/cos-js-sdk-v5.js",
"types": "index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions src/advance.js
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@ function uploadFile(params, callback) {

// 上传链路
if (self.options.EnableTracker) {
const accelerate = self.options.UseAccelerate || self.options.Domain.includes('accelerate.');
const accelerate = self.options.UseAccelerate || self.options.Domain && self.options.Domain.includes('accelerate.');
params.tracker = new Tracker({
bucket: params.Bucket,
region: params.Region,
Expand Down Expand Up @@ -926,7 +926,7 @@ function uploadFiles(params, callback) {

// 单个文件上传链路
if (self.options.EnableTracker) {
const accelerate = self.options.UseAccelerate || self.options.Domain.includes('accelerate.');
const accelerate = self.options.UseAccelerate || self.options.Domain && self.options.Domain.includes('accelerate.');
fileParams.tracker = new Tracker({
bucket: fileParams.Bucket,
region: fileParams.Region,
Expand Down

0 comments on commit b038089

Please sign in to comment.