lloydzhou 1 년 전
부모
커밋
877668b629
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      app/store/plugin.ts

+ 1 - 1
app/store/plugin.ts

@@ -48,7 +48,7 @@ export const FunctionToolService = {
         ? ` Bearer ${plugin?.authToken}`
         : plugin?.authToken;
     const definition = yaml.load(plugin.content) as any;
-    const serverURL = definition.servers?.[0]?.url;
+    const serverURL = definition?.servers?.[0]?.url;
     const baseURL = !!plugin?.usingProxy ? "/api/proxy" : serverURL;
     const api = new OpenAPIClientAxios({
       definition: yaml.load(plugin.content) as any,