Skip to content
This repository was archived by the owner on Nov 15, 2024. It is now read-only.

Commit 783ef7d

Browse files
committed
fix: Use correct default endpoint in browser
1 parent cb8c00e commit 783ef7d

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

docs/classes/Seam.md

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/seam-connect/client.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,13 @@ export interface SeamClientOptions {
3838
export const getSeamClientOptionsWithDefaults = (
3939
apiKeyOrOptions?: string | SeamClientOptions
4040
): SeamClientOptions => {
41-
let seamClientDefaults: SeamClientOptions = {}
41+
const defaultEndpoint = "https://connect.getseam.com"
42+
let seamClientDefaults: SeamClientOptions = { endpoint: defaultEndpoint }
4243
try {
4344
// try to get defaults from environment (for server-side use)
4445
seamClientDefaults = {
4546
apiKey: process?.env?.SEAM_API_KEY,
46-
endpoint: process?.env?.SEAM_API_URL || "https://connect.getseam.com",
47+
endpoint: process?.env?.SEAM_API_URL ?? defaultEndpoint,
4748
workspaceId: process?.env?.SEAM_WORKSPACE_ID,
4849
}
4950
} catch (error) {

0 commit comments

Comments
 (0)