Skip to content

Commit 1a59002

Browse files
committed
Fix test "should handle empty documents"
1 parent a9e791b commit 1a59002

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

server/src/server.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,8 @@ export function validateScrapScript(
278278
): Diagnostic[] {
279279
const diagnostics: Diagnostic[] = [];
280280

281+
if (text === "") return diagnostics;
282+
281283
try {
282284
const tree = parse(text);
283285
const rootNode = tree.rootNode;

0 commit comments

Comments
 (0)