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
ts-proto never retrieves globalThis #732
Comments
Huh! Good catch @andykais ! Are you interested in submitting a PR to fix this? That'd be great if so! Otherwise yeah I'll get around to fixing this at some point; kinda surprised no one had noticed this was broken, but I guess maybe it was just always hitting one of the non- |
so unfortunately getting approval to contribute to existing open source projects is something fairly difficult to do through my job 😞. It can take months. The best I can do is give some advice on what a good change would be |
Ah sure @andykais , that makes sense wrt getting approval. Given your great diagnosis/articulation of the problem, this was a pretty simple quick fix, so I went ahead and pushed it out. Thank you! |
nice! Thanks @stephenh |
🎉 This issue has been resolved in version 1.136.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Hi, I noticed that your library has this code in it:
I was seeing failures when only
globalThis
was available in the js program. When I reduce that code down to this:it always fails. Tested on node
v12.19.0
,v19.2.0
and deno1.28.3
.This looks to be a problem with
var
declared variable hoisting.var globalThis
will declare globalThis as undefined before the code block executes, so it is always undefined. If you renamed the outer variable to something other than globalThis, the code will function.The text was updated successfully, but these errors were encountered: