ソースを参照

fix: duplicate downloading of remote config (#6544)

bubble
Aleksandr Zhuravlev 3年前
committed by GitHub
コミット
50e5f653cc
この署名に対応する既知のキーがデータベースに存在しません GPGキー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


読み込み中…
キャンセル
保存