BugSplat-Git / bugsplat-js

🐛💥🕵️ BugSplat error reporting for modern browsers
https://docs.bugsplat.com/introduction/getting-started/integrations/web/javascript
MIT License
5 stars 2 forks source link

Fix reference errors #28

Closed obermillerk closed 4 years ago

obermillerk commented 4 years ago

The _formData reference was causing a reference error that prevented my errors from being posted, as well as causing infinite errors to be generated (since every time it failed it creates a new uncaught error, and recur...), making the whole npm module useless.

Needed to do this._formData instead.

bobbyg603 commented 4 years ago

hi @obermillerk! thanks for the PR, I will merge it shortly. In the meantime, curious what runtime (node.js vs browser etc) you're using? We use this package in some of our internal tools and we never ran into this so I'm surprised to hear it was so broken for you!

obermillerk commented 4 years ago

Using it in electron 8.2.5, running on top of node 12 (lts). I've also got typescript and webpack on top, not sure if maybe they're tweaking behavior somehow.

bobbyg603 commented 4 years ago

@obermillerk thank you! webpack definitely could have been the culprit here. additionally we'll get some typings for you shortly. thanks again for the PR!

obermillerk commented 4 years ago

Thanks for the quick responses! Types would be great too!

bobbyg603 commented 4 years ago

Hey @obermillerk, version 5.0.0 has just been released and it includes a type declaration file. Here's an example project that uses the new version. Please try it out and let us know if we should make any changes!