File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,14 +2,25 @@ 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' ) {
5+ if (
6+ possibleEmberObject . default &&
7+ typeof possibleEmberObject . default . proto !== 'function' &&
8+ typeof possibleEmberObject . default . create !== 'function'
9+ ) {
610 return undefined ;
711 }
8- let proto = possibleEmberObject . default . proto ( ) ;
12+
13+ let obj = module . default . proto ? module . default . proto ( ) : module . default . create ( ) ;
14+
15+ if ( module . default . isHelperFactory ) {
16+ return {
17+ type : 'Helper' ,
18+ } ;
19+ }
920
1021 // Ember here is assumed to be global when ran within the context of the browser
1122 /* globals Ember */
12- let meta = Ember . meta ( proto ) ;
23+ let meta = Ember . meta ( obj ) ;
1324
1425 // eslint-disable-next-line no-undef
1526 if ( ! meta || ! meta . source ) {
You can’t perform that action at this time.
0 commit comments