From 31ed9d00363c322917367a0aedb4bfae661e7d92 Mon Sep 17 00:00:00 2001 From: Andre Staltz Date: Wed, 25 Oct 2023 15:33:44 +0300 Subject: [PATCH] cosmetic refactor --- lib/algorithm.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/algorithm.js b/lib/algorithm.js index 0794bec..6069251 100644 --- a/lib/algorithm.js +++ b/lib/algorithm.js @@ -101,8 +101,10 @@ class Algorithm { return this.#wantNewestRange(localHave, remoteHave, goal.count) case 'none': - default: return EMPTY_RANGE + + default: + throw new Error(`Unrecognized goal type: ${goal.type}`) } }