Skip to content

Commit

Permalink
Resolve path names correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
kanongil authored and rwjblue committed Jan 2, 2019
1 parent a51c182 commit cbbc4c4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/@ember/-internals/metal/lib/property_get.ts
Expand Up @@ -96,6 +96,10 @@ export function get(obj: object, keyName: string): any {
let isFunction = type === 'function';
let isObjectLike = isObject || isFunction;

if (isPath(keyName)) {
return isObjectLike ? _getPath(obj, keyName) : undefined;
}

let value: any;

if (isObjectLike) {
Expand All @@ -119,9 +123,6 @@ export function get(obj: object, keyName: string): any {
}

if (value === undefined) {
if (isPath(keyName)) {
return _getPath(obj, keyName);
}
if (
isObject &&
!(keyName in obj) &&
Expand Down

0 comments on commit cbbc4c4

Please sign in to comment.