Skip to content

Commit 788bb67

Browse files
committed
Fix test "should handle empty documents"
1 parent 7e99953 commit 788bb67

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
@@ -316,6 +316,8 @@ export function validateScrapScript(
316316
text: string,
317317
maxNumberOfProblems: number,
318318
): Diagnostic[] {
319+
if (text === "") return [];
320+
319321
let tree: Tree;
320322
try {
321323
tree = parse(text);

0 commit comments

Comments
 (0)