Skip to content

Commit 973d15c

Browse files
committed
Remove optional operator
1 parent 776c898 commit 973d15c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,6 @@ function isNameSafe(name: string) {
628628
}
629629

630630
function isNextNameSafe(token: Token | undefined) {
631-
if (token?.type !== "text") return true;
631+
if (!token || token.type !== "text") return true;
632632
return !ID_CONTINUE.test(token.value[0]);
633633
}

0 commit comments

Comments
 (0)