@@ -244,7 +244,7 @@ export default EmberObject.extend(PortMixin, {
244244 }
245245 tracked [ item . name ] = tagInfo ;
246246 } else {
247- value = calculateCP ( object , item . name , { } ) ;
247+ value = calculateCP ( object , item , { } ) ;
248248 if ( values [ item . name ] !== value ) {
249249 changed = true ;
250250 values [ item . name ] = value ;
@@ -401,7 +401,7 @@ export default EmberObject.extend(PortMixin, {
401401 if ( isNone ( prop ) ) {
402402 value = this . sentObjects [ objectId ] ;
403403 } else {
404- value = calculateCP ( object , prop , { } ) ;
404+ value = calculateCP ( object , { name : prop } , { } ) ;
405405 }
406406
407407 this . sendValueToConsole ( value ) ;
@@ -421,7 +421,7 @@ export default EmberObject.extend(PortMixin, {
421421
422422 digIntoObject ( objectId , property ) {
423423 let parentObject = this . sentObjects [ objectId ] ;
424- let object = calculateCP ( parentObject , property , { } ) ;
424+ let object = calculateCP ( parentObject , { name : property } , { } ) ;
425425
426426 if ( this . canSend ( object ) ) {
427427 const currentObject = this . currentObject ;
@@ -653,7 +653,7 @@ export default EmberObject.extend(PortMixin, {
653653 if ( object . isDestroying ) {
654654 value = '<DESTROYED>' ;
655655 } else {
656- value = calculateCP ( object , property , this . get ( '_errorsFor' ) [ objectId ] ) ;
656+ value = calculateCP ( object , { name : property } , this . get ( '_errorsFor' ) [ objectId ] ) ;
657657 }
658658
659659 if ( ! value || ! ( value instanceof CalculateCPError ) ) {
@@ -963,7 +963,7 @@ function calculateCPs(object, mixinDetails, errorsForObject, expensiveProperties
963963 if ( item . canTrack && HAS_GLIMMER_TRACKING ) {
964964 const tagInfo = tracked [ item . name ] = { } ;
965965 tagInfo . tag = metal . track ( ( ) => {
966- value = calculateCP ( object , item . name , errorsForObject ) ;
966+ value = calculateCP ( object , item , errorsForObject ) ;
967967 } ) ;
968968 if ( tagInfo . tag === metal . tagForProperty ( object , item . name ) ) {
969969 if ( ! item . isComputed && ! item . isService ) {
@@ -974,7 +974,7 @@ function calculateCPs(object, mixinDetails, errorsForObject, expensiveProperties
974974 tagInfo . revision = glimmer . value ( object , item . name ) ;
975975 item . dependentKeys = getTrackedDependencies ( object , item . name , tagInfo . tag ) ;
976976 } else {
977- value = calculateCP ( object , item . name , errorsForObject ) ;
977+ value = calculateCP ( object , item , errorsForObject ) ;
978978 }
979979 if ( ! value || ! ( value instanceof CalculateCPError ) ) {
980980 item . value = inspectValue ( object , item . name , value ) ;
@@ -1140,13 +1140,14 @@ function toArray(errors) {
11401140 return keys ( errors ) . map ( key => errors [ key ] ) ;
11411141}
11421142
1143- function calculateCP ( object , property , errorsForObject ) {
1143+ function calculateCP ( object , item , errorsForObject ) {
1144+ const property = item . name ;
11441145 delete errorsForObject [ property ] ;
11451146 try {
11461147 if ( object instanceof Ember . ArrayProxy && property == parseInt ( property ) ) {
11471148 return object . objectAt ( property ) ;
11481149 }
1149- return get ( object , property ) ;
1150+ return item . isGetter ? object [ property ] : get ( object , property ) ;
11501151 } catch ( error ) {
11511152 errorsForObject [ property ] = { property, error } ;
11521153 return new CalculateCPError ( ) ;
0 commit comments