After upgrading my angular2 packages to the latest versions, I encountered the following error:
- @angular/common": "^2.3.1
- @angular/compiler": "^2.3.1
- @angular/core": "^2.3.1
- @angular/forms": "^2.3.1
- @angular/http": "^2.3.1
- @angular/platform-browser": "^2.3.1"
- @angular/platform-browser-dynamic": "^2.3.1
- @angular/platform-server": "^2.3.1
- @angular/router": "^3.3.1
Error:
Unable to get property 'apply' of undefined or null reference
https://i.sstatic.net/xE5EY.png
This error only occurs in IE11, while it works fine in Chrome.
Investigating further, the error seems to be triggered in the angular/common module:
function combine(options) {
return (_a = ((Object))).assign.apply(_a, [{}].concat(options));
var _a;
}
The corresponding typescript file:
@angular/common/src/pipes/intl.ts line 175
function combine(options: Intl.DateTimeFormatOptions[]): Intl.DateTimeFormatOptions {
return (<any>Object).assign({}, ...options);
}
The combine
function is called in the code snippet at
@angular/common/src/pipes/intl.ts line 48:
'yMMMdjms': datePartGetterFactory(combine([
UPDATE
Upon further investigation, it appears that the issue lies in the fact that the .assign
method is not supported in IE11