Skip to content

Commit 4a939b2

Browse files
authored
fix: 修复Credentials (#159)
1 parent efd9332 commit 4a939b2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cos-nodejs-sdk-v5",
3-
"version": "2.11.17",
3+
"version": "2.11.18",
44
"description": "cos nodejs sdk v5",
55
"main": "index.js",
66
"types": "index.d.ts",

sdk/cos.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ var COS = function (options) {
8686
console.warn('warning: Please change options secretId/secretKey to SecretId/SecretKey.');
8787
}
8888
// 支持外部传入Cred动态秘钥
89-
if (this.options.Credentials) {
89+
if (this.options.Credentials.secretId && this.options.Credentials.secretKey) {
9090
this.options.SecretId = this.options.Credentials.secretId || '';
9191
this.options.SecretKey = this.options.Credentials.secretKey || '';
9292
}

0 commit comments

Comments
 (0)