-
-
Notifications
You must be signed in to change notification settings - Fork 259
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
Add "owner" reserved word warning #244
Comments
That seems like a good idea. We should probably warn whenever someone tries to set Or we make |
Yep, totally happy with this. But not quite sure how to implement. I suppose we could swap from normal property sets to Object.defineProperty with a setter that throws a helpful error? |
can't we do that check in the |
Sure, but won’t catch most cases. I don’t think most folks go through set unless required... |
After running
ember-qunit-codemod
against our app I observed that a test was falling with the following message:TypeError: Cannot read property 'apply' of undefined
The relevant potion of the affected test:
It looks like this is now falling because the
owner
property is now set within the test context (https://github.com/emberjs/ember-test-helpers/blame/0cacde9a1ba308409394b18f3705e60499955b45/addon-test-support/%40ember/test-helpers/setup-context.js#L90).
I am not sure what may be the best way to handle this, but, I am thinking adding a check prior to setting
owner
may be helpful.The text was updated successfully, but these errors were encountered: