fix: head units regex

This commit is contained in:
2025-05-03 13:47:51 +02:00
parent c296ef6dcd
commit 7aaf620d6a
+1 -1
View File
@@ -32,7 +32,7 @@ export function getHeadUnits(stockString: string) {
const stockList = stockString.split(';').slice(0, 3);
return stockList.reduce((acc, unitType, i) => {
if (i != 0 && !/-\d+$/.test(unitType)) return acc;
if (i != 0 && !/-\d{3,}$/.test(unitType)) return acc;
const unitName = unitType.slice(0, unitType.indexOf('-'));