Skip to content

Commit

Permalink
Check for owner before calling isGlimmerTwo
Browse files Browse the repository at this point in the history
Resolves #816
  • Loading branch information
RobbieTheWagner committed Jul 29, 2018
1 parent cd3d296 commit c753a02
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ember_debug/view-debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ export default EmberObject.extend(PortMixin, {
};
window.addEventListener('resize', this.resizeHandler);

if (this.isGlimmerTwo()) {
// We do not have an `owner` when testing, so check for an owner here before calling isGlimmerTwo
if (this.getOwner() && this.isGlimmerTwo()) {
this.glimmerTree = new GlimmerTree({
owner: this.getOwner(),
retainObject: this.retainObject.bind(this),
Expand Down Expand Up @@ -356,7 +357,7 @@ export default EmberObject.extend(PortMixin, {
},

isGlimmerTwo() {
return this.get('namespace.owner').hasRegistration('service:-glimmer-environment');
return this.getOwner().hasRegistration('service:-glimmer-environment');
},

modelForView(view) {
Expand Down

0 comments on commit c753a02

Please sign in to comment.