Skip to content

fix: prevent window undefined error during SSR in config utils#1466

Open
yuliang19951126-sketch wants to merge 1 commit intobytedance:mainfrom
yuliang19951126-sketch:fix/ssr-window-undefined-error
Open

fix: prevent window undefined error during SSR in config utils#1466
yuliang19951126-sketch wants to merge 1 commit intobytedance:mainfrom
yuliang19951126-sketch:fix/ssr-window-undefined-error

Conversation

@yuliang19951126-sketch
Copy link
Copy Markdown

Summary

  • Fixed SSR (Server-Side Rendering) error where window is undefined in config utilities
  • Added proper browser environment check before accessing window object

Test plan

  • Verify frontend builds without SSR window errors

Add typeof window check before accessing window.location.origin in
getBackendBaseURL() and getLangGraphBaseURL() to handle server-side
rendering where window is not defined.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 27, 2026

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants