Closed ArcadeRenegade closed 7 months ago
Sounds reasonable. PRs welcome 🙂 or I'll get to it when I can.
@ArcadeRenegade Can you try hibp@experimental
and see if it resolves your issue? 🙏
@ArcadeRenegade Can you try
hibp@experimental
and see if it resolves your issue? 🙏
I think the one I published when I wrote that was busted, you may need to force reinstall the experimental
tag if you were quick to test it (or install hibp@0.0.0-dev.d74e2ad2
directly). 😛
@wKovacs64 I just tested and I can confirm it works in an extension background thread / web worker.
@wKovacs64 thanks for looking into this!
Sweet, thanks for confirming!
@all-contributors please add @ArcadeRenegade for bug reports.
@wKovacs64
I've put up a pull request to add @ArcadeRenegade! :tada:
@ArcadeRenegade Fix has been released in v14.1.0. Thanks again.
Looks like all API methods fail when trying to call them from a web worker or extension background threads since
window
isundefined
.Looking at
src/api/web-fetch.ts
it looks like it assumes it is running in a NodeJS environment ifwindow
isundefined
.Perhaps a more accurate check to see if native fetch is available can be simply
'fetch' in globalThis