File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ export class EntityFactory<Entity> implements EntityFactoryInterface<Entity> {
7474 if ( this . isPromiseLike ( entity [ attribute ] ) ) {
7575 entity [ attribute ] = await entity [ attribute ] ;
7676 }
77-
77+
7878 if ( typeof entity [ attribute ] === 'object' && entity [ attribute ] instanceof EntityFactory ) {
7979 const subEntityFactory = entity [ attribute ] ;
8080 const subEntity = await ( subEntityFactory as any ) . build ( ) ;
@@ -86,6 +86,6 @@ export class EntityFactory<Entity> implements EntityFactoryInterface<Entity> {
8686 }
8787
8888 private isPromiseLike ( object : any ) : boolean {
89- return object && typeof object . then === 'function' ;
89+ return ! ! object && ( typeof object === 'object' || typeof object === 'function' ) && typeof object . then === 'function' ;
9090 }
9191}
You can’t perform that action at this time.
0 commit comments