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

JS: Fixed ReferenceError: window is not defined #9156

Merged
merged 1 commit into from Oct 26, 2021
Merged

JS: Fixed ReferenceError: window is not defined #9156

merged 1 commit into from Oct 26, 2021

Conversation

MarnixBouhuis
Copy link
Contributor

PR #8864 introduced a bug (#9152) in generated JS code where it would error getting the global object saying that window is undefined.

I've missed this scenario in my original PR so this PR is here to make the functionality more robust.
This PR fixes this issue by explicitly checking if window is defined.

@google-cla google-cla bot added the cla: yes label Oct 26, 2021
@MarnixBouhuis MarnixBouhuis changed the title Fixed ReferenceError: window is not defined for nodejs JS: Fixed ReferenceError: window is not defined Oct 26, 2021
@acozzette acozzette merged commit e350ef8 into protocolbuffers:master Oct 26, 2021
@acozzette
Copy link
Member

@MarnixBouhuis Thanks!

@MarnixBouhuis MarnixBouhuis deleted the fix/window-undefined branch October 27, 2021 07:34
acozzette pushed a commit to acozzette/protobuf that referenced this pull request Oct 28, 2021
@arrony6585
Copy link

MarnixBouhuis:fix/window-undefined

@arrony6585
Copy link

I'll

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

Successfully merging this pull request may close these issues.

None yet

4 participants