Skip to content

Commit

Permalink
Fixed: API not loaded the first time
Browse files Browse the repository at this point in the history
  • Loading branch information
malincrist committed Feb 28, 2024
1 parent 6a0c19a commit d3c2d35
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 d3c2d35

Please sign in to comment.