Skip to content

Commit

Permalink
Fixed: API not loaded the first time (#2424)
Browse files Browse the repository at this point in the history
  • Loading branch information
malincrist authored Feb 29, 2024
1 parent 6a0c19a commit 4cb8563
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/apis/details-of-api/ko/runtime/api-details.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ export class ApiDetails {
@OnMounted()
public async initialize(): Promise<void> {
const apiName = this.routeHelper.getApiName();

this.router.addRouteChangeListener(this.onRouteChange);

if (!apiName) {
return;
}

this.selectedApiName(apiName);
await this.loadApi(apiName);

this.router.addRouteChangeListener(this.onRouteChange);
this.currentApiVersion.subscribe(this.onVersionChange);
this.downloadSelected.subscribe(this.onDownloadChange);
}
Expand Down

0 comments on commit 4cb8563

Please sign in to comment.