From d46117eddc143c7e2bca7e6a6b939fcadb4dab09 Mon Sep 17 00:00:00 2001 From: Robert Wagner Date: Sun, 29 Jul 2018 15:18:47 -0400 Subject: [PATCH] Use Ember.get to get _debugInfo Resolves #791 I believe using Ember.get should fix this issue right @rwjblue? It was this error: ``` Error message: Assertion Failed: You attempted to access the `_debugInfo` property (of ). Since Ember 3.1, this is usually fine as you no longer need to use `.get()` to access computed properties. **However, in this case, the object in question is a special kind of Ember object (a proxy). Therefore, it is still necessary to use `.get('_debugInfo')` in this case.** ``` --- ember_debug/object-inspector.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ember_debug/object-inspector.js b/ember_debug/object-inspector.js index f1856f2f11..0e0a870b2f 100644 --- a/ember_debug/object-inspector.js +++ b/ember_debug/object-inspector.js @@ -728,8 +728,9 @@ function twoTenfilterHack(itemName, skipProperties) { function getDebugInfo(object) { let debugInfo = null; - if (object._debugInfo && typeof object._debugInfo === 'function') { - debugInfo = object._debugInfo(); + const objectDebugInfo = get(object, '_debugInfo'); + if (objectDebugInfo && typeof objectDebugInfo === 'function') { + debugInfo = objectDebugInfo(); } debugInfo = debugInfo || {}; let propertyInfo = debugInfo.propertyInfo || (debugInfo.propertyInfo = {});