From a1f96dc82c8795132673fc6a692cd993bff4f6ad Mon Sep 17 00:00:00 2001 From: reimu Date: Tue, 3 Oct 2023 17:50:48 -0500 Subject: [PATCH] Simplify code --- src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index 074200f..38daa3d 100644 --- a/src/main.ts +++ b/src/main.ts @@ -94,7 +94,7 @@ function t(notes: string, steps: number): string { return notes .split("") .map((key, i) => { - const pos = keys.findIndex((note) => note === key); + const pos = keys.indexOf(key); if (pos === -1) return key; // assume this is other notation const newPos = pos + steps; if (newPos < 0 || newPos >= keys.length) {