fixed error because it is now object instead of array
This commit is contained in:
@@ -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 }">
|
||||
|
||||
Reference in New Issue
Block a user