Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with runtime config default options #9844

Closed
char0n opened this issue Apr 18, 2024 · 1 comment · May be fixed by codingfragments/tvh-guide#134
Closed

Issue with runtime config default options #9844

char0n opened this issue Apr 18, 2024 · 1 comment · May be fixed by codingfragments/tvh-guide#134

Comments

@char0n
Copy link
Member

char0n commented Apr 18, 2024

image

The reason is here: https://github.com/swagger-api/swagger-ui/blob/master/src/core/config/defaults.js#L18

Anybody that is using swagger-ui-react in SSR mode (Server Side Rendering) will see this. The window is not available at build time. Because the defaults were defined before in SwaggerUI constructor, it meant that the code executed in runtime during rendering in browser when the window is already available.

To fix this, we have to introduce new runtime source with the precedence lower than userOptions.

Regression was introduced in https://github.com/swagger-api/swagger-ui/releases/tag/v5.16.0

@char0n
Copy link
Member Author

char0n commented Apr 18, 2024

Addressed in #9845

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

Successfully merging a pull request may close this issue.

2 participants