summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElizabeth (Lizzy) Hunt <elizabeth.hunt@simponic.xyz>2023-12-02 11:56:19 -0700
committerGitHub <noreply@github.com>2023-12-02 11:56:19 -0700
commit118fc144884f0d716cc03e877aa85f83d289cec8 (patch)
tree048ced1c7b678c2731383c4c578504c2c96b0ed2
parente84a341243a20268a2daacc4bcb7aadde8e1f8fd (diff)
downloadaoc-118fc144884f0d716cc03e877aa85f83d289cec8.tar.gz
aoc-118fc144884f0d716cc03e877aa85f83d289cec8.zip
Update part_2.ts
-rw-r--r--template/part_2.ts2
1 files changed, 1 insertions, 1 deletions
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");