Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit 72d5749

Browse files
committed
should check the asyncfunction's name
1 parent 4ea5a02 commit 72d5749

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/zone.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ const Zone: ZoneType = (function(global: any) {
665665
}
666666

667667
const detectAsyncFunction = async function() {};
668-
const AsyncFunction = detectAsyncFunction.constructor;
668+
const AsyncFunction = (detectAsyncFunction.constructor as any).name === 'AsyncFunction' ? detectAsyncFunction.constructor : null;
669669

670670
class Zone implements AmbientZone {
671671
static __symbol__: (name: string) => string = __symbol__;

0 commit comments

Comments
 (0)