Skip to content

Commit

Permalink
fix: env import parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
scarqin committed Jan 28, 2022
1 parent 0e02092 commit 4a28d30
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions src/app/pages/api/tab/api-tab.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ export class ApiTabComponent implements OnInit, OnDestroy {
public tabSerive: ApiTabService,
private messageService: MessageService
) {}

ngOnInit(): void {
this.watchApiAction();
}
Expand Down Expand Up @@ -149,8 +148,8 @@ export class ApiTabComponent implements OnInit, OnDestroy {
}
if (selectIndex !== this.selectedIndex) {
this.selectedIndex = selectIndex;
}else{
this.pickTab()
} else {
this.pickTab();
}
}
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export class TestServerAPIKitService implements TestServer {
};
const formatEnv = (env) => {
let result = {
paramList: env.parameters.map((val) => ({ paramKey: val.name, paramValue: val.value })),
paramList: (env.parameters||[]).map((val) => ({ paramKey: val.name, paramValue: val.value })),
frontURI: env.hostUri,
};
return result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,8 @@ export class TestServerLocalNodeService implements TestServer {
return result;
};
const formatEnv = (env) => {
console.log('env.parameters', env);
let result = {
paramList: env.parameters.map((val) => ({ paramKey: val.name, paramValue: val.value })),
paramList: (env.parameters||[]).map((val) => ({ paramKey: val.name, paramValue: val.value })),
frontURI: env.hostUri,
};
return result;
Expand Down

0 comments on commit 4a28d30

Please sign in to comment.