Skip to content

Commit 608e895

Browse files
authored
Fixed: API not loaded the first time (#2424)
1 parent f4cc8af commit 608e895

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/apis/details-of-api/ko/runtime/api-details.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ export class ApiDetails {
4444
@OnMounted()
4545
public async initialize(): Promise<void> {
4646
const apiName = this.routeHelper.getApiName();
47-
47+
this.router.addRouteChangeListener(this.onRouteChange);
48+
4849
if (!apiName) {
4950
return;
5051
}
5152

5253
this.selectedApiName(apiName);
5354
await this.loadApi(apiName);
5455

55-
this.router.addRouteChangeListener(this.onRouteChange);
5656
this.currentApiVersion.subscribe(this.onVersionChange);
5757
this.downloadSelected.subscribe(this.onDownloadChange);
5858
}

0 commit comments

Comments
 (0)