fixed error because it is now object instead of array

This commit is contained in:
2024-10-10 10:58:37 +02:00
parent 883912a46f
commit fd70379db6

View File

@@ -25,7 +25,9 @@ Vue.component('warehouse-e-shop', {
<template v-slot:price="{ row }">
<span v-if="row.hasOwnProperty('calculatedSellPrice')"> {{ row.calculatedSellPrice.toFixed(2) }} €</span>
<span v-else>{{ JSON.parse(row.cheapestSellPrice).find(price => price.title === 'Energie Steiermark').price.toFixed(2) }} €</span>
<span v-else>{{
Array.isArray(JSON.parse(row.cheapestSellPrice)) ? JSON.parse(row.cheapestSellPrice).find(price => price.title === 'Energie Steiermark').price.toFixed(2) :
Object.values(JSON.parse(row.cheapestSellPrice)).find(price => price.title === 'Energie Steiermark').price.toFixed(2) }} €</span>
</template>
<template v-slot:amount="{ row }">