-
Notifications
You must be signed in to change notification settings - Fork 215
Can't find variable: IntlPolyfill #330
Comments
Maybe you can try to add try/catch around the |
The error is most likely coming from the Try: async function initIntl() {
if (typeof Intl === "object") {
return;
}
await import("intl");
await Promise.all([
import("intl/locale-data/jsonp/nl"),
import("intl/locale-data/jsonp/de")
]);
} |
Any updates about whether @cipater's solution fixed it? I'm seeing the same issue. |
This is happening on our platform as well. We get the errors from our bug tracking tool called Sentry, quite often. It seems to mostly happen in Safari browsers although sometimes in Chrome as well. Our initialization of if (!global.Intl) {
Promise.all([import('intl'), import('intl/locale-data/jsonp/sv')]).then(() => run())
} else {
run()
} Any further tips or suggestions on how to solve this? |
I've also experienced this error. I think this might happen because if (!window.Intl) {
import('intl').then(() => {
Promise.all([import('intl/locale-data/jsonp/sv')]).then(() => run())
})
} else {
run()
} |
Alright, we might give this a shot? Although, is this even working for you? |
@albingroen I can't tell yet - I just implemented this change :( |
@albingroen The promises in My previous example is more or less what I'm using in production, and it has fixed the errors for me. If you can use async functions, await the import of the Although, strictly speaking, |
@cipater Yeah we actually ended up chaining the imports instead of using Promise.all. This is now in production and we're waiting to see if we get any more errors: import('intl')
.then(() => import('intl/locale-data/jsonp/sv'))
.then(() => run()) |
Hi 👋
I recently implemented this package and our Error Reporting tool is catching a lot of the following error for Safari 9.x
My implementation is:
I can't seem to reproduce the error in BrowserStack but we do get messages from users where they can't load the page but after a refresh it works again.
Any idea what is going wrong and how to fix it?
The text was updated successfully, but these errors were encountered: