sorted buyer types in cart popup highest price first

This commit is contained in:
zino
2021-07-28 10:09:51 +02:00
parent 61f9c57536
commit 28554886ff

View File

@@ -113,7 +113,11 @@ function addDropdownBuyerTypeOptions(inBuyerTypes: I.TypeBuyerType, inSelector:
if (!inBuyerTypes)
return;
inBuyerTypes.forEach(arr => {
console.log(inBuyerTypes);
inBuyerTypes.sort((a, b) => {
return <any>b[1] - <any>a[1];
}).forEach(arr => {
if (arr[0])
appendOption(inSelector, arr)
});