From 984e209b29d2cf825ffe22f82d67216224791800 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Mon, 25 Dec 2023 00:06:56 -0800 Subject: feat(tools): suggest path for error --- src/lib/Error/path.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib') diff --git a/src/lib/Error/path.ts b/src/lib/Error/path.ts index 50874a12..f493726b 100644 --- a/src/lib/Error/path.ts +++ b/src/lib/Error/path.ts @@ -4,7 +4,7 @@ export const closest = (path: string, suggestions: string[]) => { let closest = ''; let lowestDistance = Infinity; - suggestions.forEach((suggestion) => { + [...suggestions, '...'].forEach((suggestion) => { const distance = levenshtein.get(path, suggestion); if (distance < lowestDistance) { -- cgit v1.2.3