Skip to content

Commit

Permalink
fix component attrs inspect (emberjs#1150)
Browse files Browse the repository at this point in the history
attrs is an object without prototype, so instanceof Object does not work but typeOf does

Co-authored-by: Robert Wagner <rwwagner90@gmail.com>
Co-authored-by: Jerry Nummi <nummi@users.noreply.github.com>
  • Loading branch information
3 people authored and SYU15 committed Apr 25, 2020
1 parent 63c1d3a commit 056be0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ember_debug/object-inspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ export default EmberObject.extend(PortMixin, {
},

canSend(val) {
return val && ((val instanceof EmberObject) || (val instanceof Object) || typeOf(val) === 'array');
return val && ((val instanceof EmberObject) || (val instanceof Object) || typeOf(val) === 'object' || typeOf(val) === 'array');
},

saveProperty(objectId, prop, val) {
Expand Down

0 comments on commit 056be0f

Please sign in to comment.