"Intl not available" errors in some IE11 settings for recent Windows updates
See original GitHub issueHi! I’m working on an enterprise project that consumes Luxon. We’re getting reports of an “Intl not available” bug that seems to be present on IE11 in certain settings (like a nonexistent manifest file) for some recent (March 2019) updates of Windows. (relevant: Microsoft forum thread; StackOverflow thread.) Our stacktrace goes back to the hasIntl
function - it appears that the very act of referencing Intl to check if it exists is throwing this error.
I think a workaround could be as simple as adding a try/catch block surrounding hasIntl
’s logic. The catch block would swallow the error return false
to any consumers of hasIntl
. This thread has some links to PRs with alternative solutions, like conditional polyfills, but given that Luxon already has robust workarounds for Intl not being defined, it seems like adding some more hardening to the hasIntl
function would be a satisfactory solution here. This bug also seems relatively rare on our end, so I don’t expect many people to travel the catch
path anyway. I forked Luxon to experiment with this change and it fixes the bug in our case.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (5 by maintainers)
@phinch thank you for your reference.
@icambron Submitted a PR for this issue.