Skip to content

Commit

Permalink
feat:流水线变量'从接口获取选项'支持返回体是数组的情况 TencentBlueKing#11159
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 22243
  • Loading branch information
useryuyu committed Oct 30, 2024
1 parent 29fcd3e commit e0c3b82
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@
getResponseData (response, dataPath = 'data.records', defaultVal = []) {
try {
switch (true) {
case Array.isArray(response):
return response
case response.data && response.data.resources && Array.isArray(response.data.resources):
return response.data.resources
case response.data && response.data.record && Array.isArray(response.data.record):
Expand Down

0 comments on commit e0c3b82

Please sign in to comment.