feat(parser): return 'Unknown' when unable to match for single pattern tests

This commit is contained in:
Viren070
2024-12-28 00:00:45 +00:00
parent c1a36ef8d3
commit 3f58f861db
+1 -1
View File
@@ -11,7 +11,7 @@ function matchPattern(
return (
Object.entries(patterns).find(([_, pattern]) =>
pattern.test(filename)
)?.[0] ?? ''
)?.[0] ?? 'Unknown'
);
}