1
Fork 0

Fix numeric keys indexing enum by accident

This commit is contained in:
prescientmoon 2024-02-13 13:43:10 +01:00
parent 2fe9cc1e83
commit dac2d2f8fe
Signed by: prescientmoon
SSH key fingerprint: SHA256:UUF9JT2s8Xfyv76b8ZuVL7XrmimH4o49p4b+iexbVH4

View file

@ -25,7 +25,8 @@ export function parseConfig(input: string): Config {
keys: (parsed.keys as string[][]).map((k) =>
k.map((s) => {
const special = SpecialSymbols[s];
if (special === undefined) return s;
const isNumber = String(parseInt(s)) == s;
if (isNumber || special === undefined) return s;
return special as SpecialSymbols;
}),
),