diff options
| author | Fuwn <[email protected]> | 2023-12-25 00:06:56 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-12-25 00:07:02 -0800 |
| commit | 984e209b29d2cf825ffe22f82d67216224791800 (patch) | |
| tree | d8229a2ad8e61cb0e66d87f9f48f76657160daaa /src/lib/Error | |
| parent | refactor(error): move rate-limited to module (diff) | |
| download | due.moe-984e209b29d2cf825ffe22f82d67216224791800.tar.xz due.moe-984e209b29d2cf825ffe22f82d67216224791800.zip | |
feat(tools): suggest path for error
Diffstat (limited to 'src/lib/Error')
| -rw-r--r-- | src/lib/Error/path.ts | 2 |
1 files changed, 1 insertions, 1 deletions
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) { |