Quellcode durchsuchen

fix: duplicate downloading of remote config (#6544)

bubble
Aleksandr Zhuravlev vor 3 Jahren
committed by GitHub
Ursprung
Commit
50e5f653cc
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden GPG-Schlüssel-ID: 4AEE18F83AFDEB23
1 geänderte Dateien mit 8 neuen und 8 gelöschten Zeilen
  1. +8
    -8
      src/core/index.js

+ 8
- 8
src/core/index.js Datei anzeigen

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


const configUrl = queryConfig.config || constructorConfig.configUrl 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 { } else {
system.specActions.getConfigByUrl(configUrl, downloadSpec)
return downloadSpec()
} }


return system return system


Laden…
Abbrechen
Speichern