awto/effectfuljs

@effectful/serialization does not work in browser because `global` is missing

pfgithub opened this issue · 4 comments

rather than using global directly, it should either use globalThis (supported in node and browser) or typeof window === "undefined" ? global : window

awto commented

thanks! this is fixed in 1.4.5

That was really fast, wow. Unfortunately, there are still some more that weren't changed like this

(<any>global).__effectfulSerializationState = {};

If you have typescript support in your editor, I think you should be able to add let global; at the top of the file and then f2 rename global to globalThis to catch all of them.

awto commented

oops, now (I believe) everything should be finally ok, in 1.4.6

Thanks!