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
My app crashes with react-rails, so I've included the stack trace and the exact steps which make it crash.
The ExecJSRenderer defines window as the global scope for server rendering here: ExecJSRenderer:36
This can cause major issues when using 3rd party libraries that perform type of checks on the window variable to detect the presence of a browser environment.
The sample code with the window check is from yahoo's subscribe-ui-event
The resulting error is:
ExecJS::ProgramError
ReferenceError: document is not defined
Realistically window shouldn't be defined or available on the server, initial investigation of why this is being defined points me at react-builds/react-server.js, it is assigning variables on the window:
Activity