From 118fc144884f0d716cc03e877aa85f83d289cec8 Mon Sep 17 00:00:00 2001 From: "Elizabeth (Lizzy) Hunt" Date: Sat, 2 Dec 2023 11:56:19 -0700 Subject: [PATCH] Update part_2.ts --- template/part_2.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/part_2.ts b/template/part_2.ts index 6cd6924..3813605 100644 --- a/template/part_2.ts +++ b/template/part_2.ts @@ -8,7 +8,7 @@ const isrun = process.argv.length > 1 && process.argv[1] === import.meta.path; if (isrun) { const file = Bun.file("./problem.txt"); const text = await file.text(); - const lines = text.split("\n"); + const lines = text.split("\n").filter((x) => x && x.length); console.log("=== COMPUTATION ===\n");