-
Notifications
You must be signed in to change notification settings - Fork 159
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
Fix crashing with Babel polyfill / Chrome <= v37.0 #292
Conversation
Travis failed because transitive package seems to have dropped Node 6 support. |
lib/router/utils.ts
Outdated
* @private | ||
*/ | ||
export function isFrozenOrNotExtensible(obj: object): boolean { | ||
return Object.isFrozen(obj) || !Object.isExtensible(obj); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When is !Object.isExtensible(obj)
not enough? Specifically, I'm wondering if !Object.extensible(obj)
can ever be true for frozen objects?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right. I changed it to just !Object.isExtensible(obj)
and ran on same browsers (with Babel polyfill included) and tests pass.
I'll try to see if I can get Travis happy as well if not then I guess have to merge it as is?
6d61135
to
6faa003
Compare
I switched Travis from Node 6 -> 8. We should drop Node <= 6 and release v7 of this package, after releasing v6.2.6 with this PR and backporting all the way to Ember.js v3.12 LTS over here - https://github.com/emberjs/ember.js/blob/master/package.json#L140 Since Ember.js side uses caret for router_js version ,then simply And then for Ember canary include v7 of this package. |
Any updates on this? |
@rwjblue ping :) |
Thank you @raido! |
Closes: #291
It seems with Babel polyfill included
Object.isFrozen
vsObject.isExtensible
has different meaning:This change was tested on:
See screenshots below:
IE 9:
IE 10:
Chrome v27