Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type assertion fails in IE11 #56

Closed
simonihmig opened this issue Nov 2, 2017 · 6 comments
Closed

Type assertion fails in IE11 #56

simonihmig opened this issue Nov 2, 2017 · 6 comments

Comments

@simonihmig
Copy link
Collaborator

Oh no, me again with this crappy IE issues... 😬

As I said, I updated to the latest ember-popper, and things worked out well so far, but I see tests for IE11 (Saucelabs) failing with Types must either be a primitive type string, class, validator, or null or undefined, received: [object Element]. See https://travis-ci.org/kaliber5/ember-bootstrap/jobs/296004049#L2388

I have not digged deeper so far, but I assume the exception is thrown here, caused by type decorators like this. Seems IE11 is behaving differently here, probably Element is not of type "function"!?

@simonihmig
Copy link
Collaborator Author

Indeed, I just checked this quickly in an IE11 VM:

image

@pzuraq
Copy link
Collaborator

pzuraq commented Nov 2, 2017

Interesting, it kind of makes sense becausw IE doesn’t support new for certain types.

The main question is, can we use instanceof in any way to check whether something is an element? If not, it looks like I’ll need to add some new primitive types to @ember-decorators/argument 😕

Sorry about the regressions btw, I’m going to setup Saucelabs on this and ember-decorators, it’s not ok to have these fail for IE11 (unfortunately)

@simonihmig
Copy link
Collaborator Author

The main question is, can we use instanceof in any way to check whether something is an element?

Seems to work fine:

image

It's just the typeof check that's not following the specs I guess...

@pzuraq
Copy link
Collaborator

pzuraq commented Nov 3, 2017

@simonihmig I have a fix out for this in @ember-decorators/argument, it's going to require another update here though since some breaking changes have been made there. I'm pretty sure this will work, should be able to get it out by Monday

@simonihmig
Copy link
Collaborator Author

Great, thanks!

@simonihmig
Copy link
Collaborator Author

Just updated and can confirm the issue is fixed in IE11. Thanks a lot!

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

No branches or pull requests

2 participants