Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Update boot-client.ts to handle IE 11 shim issues #952

Closed
wants to merge 1 commit into from
Closed

Update boot-client.ts to handle IE 11 shim issues #952

wants to merge 1 commit into from

Conversation

ADefWebserver
Copy link

@ADefWebserver ADefWebserver commented May 18, 2017

In IE 11, when you get error like this:
Unable to get property 'apply' of undefined or null reference

In functions like this:

function combine(options) {
    return ((Object)).assign.apply(((Object)), [{}].concat(options));
}	

in the vendor.js file

This article tells you to use core-js because Angular already has a dependency on it:
http://stackoverflow.com/questions/41276692/angular2-ie11-unable-to-get-property-apply-of-undefined-or-null-reference

You add:
import "core-js/client/shim";

to the top of boot-client.ts

and the problem goes away.

This issue may be related:
#926

When you get error like this:
Unable to get property 'apply' of undefined or null reference

in functions like this:
function combine(options) {
    return ((Object)).assign.apply(((Object)), [{}].concat(options));
}	

in vendor.js

This article tells you to use Core.js:
http://stackoverflow.com/questions/41276692/angular2-ie11-unable-to-get-property-apply-of-undefined-or-null-reference

You add:
import "core-js/client/shim";

to the top of boot-client.ts

and the problem goes away. 

This issue may be related:
#926

A repro project is here:
https://www.dropbox.com/s/qq0fwi1kn42nkfv/HelloWorldData-ng4.zip?dl=0
@AmrineA
Copy link

AmrineA commented May 19, 2017

I can confirm that this change does resolve the error referenced.

@im1dermike
Copy link

This did not resolve my issue #926

@SteveSandersonMS
Copy link
Member

Thanks for contributing this. Since the Angular template has now moved to being Angular CLI-based, we no longer have code in this repo to determine what polyfills are placed there - we take the output from Angular CLI. As such this no longer applicable, but thanks very much for getting involved!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants