Closed janek26 closed 1 year ago
Firefox does not have this issue, otherwise we'd have spotted this a long time ago. Proof:
It does not work in Firefox when in an extension context as reported here https://bugzilla.mozilla.org/show_bug.cgi?id=1681809 I dont see a drawback to the proposed solution to not do it, do you? I could add a check to only cast it when the check fails
I didn't know about the bug. That makes sense.
I would of course prefer a generic solution that would allow the u8a check to be carried in various similar contexts, but the question is: which other contexts are we looking for?
Firefox extensions is a big one that absolutely warrants your fix.
JSDOM is meh, not too important.
Web Workers are important.
Anything else I could be missing?
not sure honestly, probably edge envs like cloudflare and vercel
We just discovered this by accident. Also this does not fix the comparison, but the produced value. So if the value comes from something different than this lib, it will fail again/needs to be casted
as inspiration: https://github.com/panva/jose#supported-runtimes
we'll keep using patch-package
for now, up to you what to do with this @paulmillr
Fixed by myself, thanks
This fixes issue #48
Firefox has the same issue as jest, so this will make the lib work in firefox.