Skip to content

Commit 65f75ec

Browse files
committed
fix: check native source correctly
native code's internal path is ~lib/native.ts instead of ~lib. However, it is more easier to check current source is same as static _native field.
1 parent 3daa41b commit 65f75ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ast.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1668,7 +1668,7 @@ export class Source extends Node {
16681668

16691669
/** Checks if this source represents native code. */
16701670
get isNative(): bool {
1671-
return this.internalPath == LIBRARY_SUBST;
1671+
return this == Source._native;
16721672
}
16731673

16741674
/** Checks if this source is part of the (standard) library. */

0 commit comments

Comments
 (0)