瀏覽代碼

fix: duplicate downloading of remote config (#6544)

bubble
Aleksandr Zhuravlev 3 年之前
committed by GitHub
父節點
當前提交
50e5f653cc
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: 4AEE18F83AFDEB23
共有 1 個文件被更改,包括 8 次插入8 次删除
  1. +8
    -8
      src/core/index.js

+ 8
- 8
src/core/index.js 查看文件

@@ -177,15 +177,15 @@ export default function SwaggerUI(opts) {

const configUrl = queryConfig.config || constructorConfig.configUrl

if (!configUrl || !system.specActions || !system.specActions.getConfigByUrl || system.specActions.getConfigByUrl && !system.specActions.getConfigByUrl({
url: configUrl,
loadRemoteConfig: true,
requestInterceptor: constructorConfig.requestInterceptor,
responseInterceptor: constructorConfig.responseInterceptor,
}, downloadSpec)) {
return downloadSpec()
if (configUrl && system.specActions && system.specActions.getConfigByUrl) {
system.specActions.getConfigByUrl({
url: configUrl,
loadRemoteConfig: true,
requestInterceptor: constructorConfig.requestInterceptor,
responseInterceptor: constructorConfig.responseInterceptor,
}, downloadSpec)
} else {
system.specActions.getConfigByUrl(configUrl, downloadSpec)
return downloadSpec()
}

return system


Loading…
取消
儲存