rollbar / rollbar.js

Error tracking and logging from Javascript to Rollbar

Home Page:https://docs.rollbar.com/docs/javascript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error 'Headers undefined' in bundle on IE11

JensMadsen opened this issue · comments

I get the error:

ReferenceError: 'Headers' is undefined

When importing (import Rollbar from 'rollbar') in production mode in IE11. I inspected the minimized bundles and it seems that the polyfills for fetch.Headers are not included in the bundles (e.g. /dist/rollbar.min.js, v2.24.1). I suspect that this is why it works in e.g. Chrome but not in IE11 which does not have the fetch API?

Rollbar.js doesn't provide a polyfill, as the code path is only executed when the application code uses fetch either natively or via its own polyfill. That said, I'm sure there's more than one fetch polyfill that doesn't implement Headers. Thank you for the report, and I'll have a PR ready shortly.

@waltjones any news on this?