Skip to content

Commit

Permalink
fix attrs/args - toString is undefined (#1189)
Browse files Browse the repository at this point in the history
* fix attrs/args - toString is undefined

getClassName already handles this case

* object name is now from toString

* Update object-inspector-test.js
  • Loading branch information
patricklx authored May 7, 2020
1 parent ec34ccd commit ba5f181
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ember_debug/object-inspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ export default EmberObject.extend(PortMixin, {
parentObject: objectId,
property,
objectId: details.objectId,
name: object.toString(),
name: getClassName(object),
details: details.mixins,
errors: details.errors
});
Expand All @@ -471,7 +471,7 @@ export default EmberObject.extend(PortMixin, {
let details = this.mixinsForObject(object);
this.sendMessage('updateObject', {
objectId: details.objectId,
name: object.toString(),
name: getClassName(object),
details: details.mixins,
errors: details.errors
});
Expand Down
2 changes: 1 addition & 1 deletion tests/ember_debug/object-inspector-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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:');

assert.equal(message.details[0].name, 'Basic Info');
assert.equal(message.details[0].properties[0].name, 'name');
Expand Down

0 comments on commit ba5f181

Please sign in to comment.