Skip to content

Commit

Permalink
fix: getObjectUrl暂时只支持回调写法 (#154)
Browse files Browse the repository at this point in the history
* fix: getObjectUrl暂时只支持回调写法

* fix: getObjectUrl暂时只支持回调写法
  • Loading branch information
livehigh authored Oct 22, 2022
1 parent a046c1c commit 0846fae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 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.13",
"version": "2.11.14",
"description": "cos nodejs sdk v5",
"main": "index.js",
"types": "index.d.ts",
Expand Down
3 changes: 1 addition & 2 deletions sdk/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -497,8 +497,7 @@ var apiWrapper = function (apiName, apiFn) {
};

var errMsg = checkParams();
var isSync = apiName === 'getAuth' || apiName === 'getV4Auth'
|| apiName.indexOf('Stream') > -1;
var isSync = ['getAuth', 'getV4Auth', 'getObjectUrl'].includes(apiName) || apiName.indexOf('Stream') > -1;
if (Promise && !isSync && !callback) {
return new Promise(function (resolve, reject) {
callback = function (err, data) {
Expand Down

0 comments on commit 0846fae

Please sign in to comment.