Skip to content

Commit

Permalink
fix: 修复Credentials (#159)
Browse files Browse the repository at this point in the history
  • Loading branch information
livehigh authored Dec 6, 2022
1 parent efd9332 commit 4a939b2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cos-nodejs-sdk-v5",
"version": "2.11.17",
"version": "2.11.18",
"description": "cos nodejs sdk v5",
"main": "index.js",
"types": "index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion sdk/cos.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ var COS = function (options) {
console.warn('warning: Please change options secretId/secretKey to SecretId/SecretKey.');
}
// 支持外部传入Cred动态秘钥
if (this.options.Credentials) {
if (this.options.Credentials.secretId && this.options.Credentials.secretKey) {
this.options.SecretId = this.options.Credentials.secretId || '';
this.options.SecretKey = this.options.Credentials.secretKey || '';
}
Expand Down

0 comments on commit 4a939b2

Please sign in to comment.