god_crypto icon indicating copy to clipboard operation
god_crypto copied to clipboard

Incompatibility with web worker?

Open finlaydotb opened this issue 3 years ago • 2 comments

I am using another deno library which has god_crypto as a dependency and introducing that library leads to compile error which comes from god_crypto

I created the issue here for that https://github.com/JamesBroadberry/deno-bcrypt/issues/15

But since the error seems to stem from god_crypto I was wondering whether you might have any insight into the issue and better still suggestions on how to fix it.

Thanks

finlaydotb avatar Apr 04 '21 23:04 finlaydotb

Hi @invisal , window is not available in a Web Worker. I would suggest changing window to globalThis. Thank you! https://github.com/timonson/djwt/issues/48

timonson avatar Apr 06 '21 22:04 timonson

But the baffling thing is that there is no where in my application where I am using window in the code. So not sure where to change window to globalThis 😬

finlaydotb avatar Apr 07 '21 07:04 finlaydotb