5

I have an angular application that works fine on all browsers, including IE11. However, in several cases (still not sure why), IE will throw a TypeError, which is caused by Angular CDK platform umd javascript:

var hasV8BreakIterator = (typeof Intl !== 'undefined' && ((/** @type {?} */ (Intl))).v8BreakIterator);

Which is minified to:

o="undefined"!=typeof Intl&&Intl.v8BreakIterator

The error is:

TypeError: Intl is not available

My question is, in general, what does "TypeError: xxx is not available" mean, and more specifically, if there is any reason this will come up.

Phil
  • 157,677
  • 23
  • 242
  • 245
Y.L
  • 694
  • 12
  • 26
  • There is this [Q/A](https://stackoverflow.com/questions/44303235/intl-not-available-in-edge-15) but I have to admit I'm not convinced by the answer there. Otherwise, this error message sounds like a resource needed by the browser couldn't be loaded, maybe because of some user settings? – Kaiido Apr 02 '19 at 05:56
  • Possible duplicate of ["Intl not available" in Edge 15](https://stackoverflow.com/questions/44303235/intl-not-available-in-edge-15) – Shibon Apr 02 '19 at 08:33
  • I am also getting similar error, found any workaround? – Dilip Nannaware Apr 16 '19 at 17:26
  • See the workaround in the response - which is specific to Angular. Otherwise just wrap the line causing the error with try and catch the error. – Y.L Apr 17 '19 at 20:08

1 Answers1

4

This was confirmed to be caused by installing KB4489881 update on Windows. The update added some logic code snippet to check whether the machine is Win8.

If it’s Win 8, IE will avoid loading Windows.Globalization.dll and continue to load jsIntl.dll.

This works fine for IE11 and the Weboc with manifest file which used to targeting the app to Windows 8.1 or Windows 10. ​However, if the weboc has no specified manifest file, then the version detection would return as Windows 8 version (6.2.0.0) even if runs on Windows 8.1 or Windows 10.

The following article clarify the issue on what needs to be done from your side:

Targeting your application for Windows https://learn.microsoft.com/en-us/windows/desktop/SysInfo/targeting-your-application-at-windows-8-1

Also, a workaround was issued to the angular package: https://github.com/angular/material2/pull/15693

Y.L
  • 694
  • 12
  • 26