Files
Roo-Code/src/api
lloydchang 9abe3f6916 fix(openai.ts): default to an empty string if undefined
Change:

const urlHost = new URL(this.options.openAiBaseUrl).host;

To:

const urlHost = new URL(this.options.openAiBaseUrl ?? "").host;

because the nullish coalescing operator (??) to default to an empty string if this.options.openAiBaseUrl is undefined.

It ensures that the URL constructor always receives a valid string.
2024-12-11 02:37:26 -08:00
..
2024-11-12 22:02:42 -05:00