You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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 thanuserOptions
.Regression was introduced in https://github.com/swagger-api/swagger-ui/releases/tag/v5.16.0
The text was updated successfully, but these errors were encountered: