From 3cfbeb5d78059c12498302bfd0a433105afe3322 Mon Sep 17 00:00:00 2001 From: scarqin <1054139596@qq.com> Date: Thu, 9 Feb 2023 10:22:32 +0800 Subject: [PATCH] fix: header send error --- .../project/api/service/test-server/test-server.service.ts | 2 +- .../src/app/shared/services/extensions/extension.service.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/workbench/browser/src/app/pages/workspace/project/api/service/test-server/test-server.service.ts b/src/workbench/browser/src/app/pages/workspace/project/api/service/test-server/test-server.service.ts index 337b186a..c7f8d118 100644 --- a/src/workbench/browser/src/app/pages/workspace/project/api/service/test-server/test-server.service.ts +++ b/src/workbench/browser/src/app/pages/workspace/project/api/service/test-server/test-server.service.ts @@ -28,7 +28,7 @@ export abstract class TestServerService implements TestServer { .map((val: BodyParam) => ({ checkbox: !!val.isRequired, headerName: val.name, - headerValue: val.paramAttr?.example + headerValue: val['paramAttr.example'] || val.paramAttr?.example })); }; const formatBody = (inData: Partial) => { diff --git a/src/workbench/browser/src/app/shared/services/extensions/extension.service.ts b/src/workbench/browser/src/app/shared/services/extensions/extension.service.ts index 5189427b..e50e0f5c 100644 --- a/src/workbench/browser/src/app/shared/services/extensions/extension.service.ts +++ b/src/workbench/browser/src/app/shared/services/extensions/extension.service.ts @@ -135,7 +135,7 @@ export class ExtensionService { let result = {} as ExtensionInfo; const { code, data }: any = await this.requestDetail(name); Object.assign(result, data); - if (this.installedMap.has(name)) { + if (this.installedMap?.has(name)) { Object.assign(result, this.installedMap.get(name), { installed: true }); result.enable = this.isEnable(result.name); }