Skip to content

Commit 66cd545

Browse files
minor logic error
1 parent 2651d17 commit 66cd545

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

lib/gather/analyze-ember-object.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@ module.exports = function analyzeEmberObject(possibleEmberObject) {
22
if (typeof possibleEmberObject !== 'object' || possibleEmberObject === null) {
33
return undefined;
44
}
5-
if (possibleEmberObject.default && typeof possibleEmberObject.default.proto !== 'function') {
6-
return undefined;
7-
}
8-
9-
if (possibleEmberObject.default.isHelperFactory) {
10-
return {
11-
type: 'Helper',
12-
};
5+
let eObjDefault = possibleEmberObject.default;
6+
7+
if (eObjDefault) {
8+
if (eObjDefault.isHelperFactory) {
9+
return {
10+
type: 'Helper',
11+
};
12+
} else if (typeof eObjDefault.proto !== 'function') {
13+
return undefined;
14+
}
1315
}
1416

1517
let proto = possibleEmberObject.default.proto();

0 commit comments

Comments
 (0)