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

fix attrs/args - toString is undefined #1189

Merged
merged 3 commits into from
May 7, 2020

Conversation

patricklx
Copy link
Collaborator

getClassName already handles this case

getClassName already handles this case
@RobbieTheWagner
Copy link
Member

@patricklx seems like we had a failing test. I restarted them in case it was a fluke, but may need to look into it.

@@ -712,7 +712,7 @@ module('Ember Debug - Object Inspector', function(hooks) {

let message = await inspectObject(proxy);

assert.ok(message.name.includes('(unknown)'));
assert.ok(message.name.includes('ObjectProxy'), 'object name should start with <ObjectProxy:');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@patricklx Is this the intended output? I suppose it is better than unknown, but just want to make sure things are working as intended.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, since getClassName replaces that part with the class name. But i think it only does it dev builds. in prod it will show unknown again

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there not a way to show the same things in both?

Copy link
Collaborator Author

@patricklx patricklx May 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, since the the class name comes from constructor.name, which will show the uglified value in production

@RobbieTheWagner RobbieTheWagner merged commit ba5f181 into emberjs:master May 7, 2020
@patricklx patricklx deleted the patch-9 branch May 7, 2020 21:07
patricklx added a commit to patricklx/ember-inspector that referenced this pull request Sep 19, 2022
* fix attrs/args - toString is undefined

getClassName already handles this case

* object name is now from toString

* Update object-inspector-test.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants