fix: possible undefined values

This commit is contained in:
Sérgio Salgado 2022-02-11 16:38:23 +00:00
parent 4015e23d34
commit ca88eafffd

View file

@ -61,7 +61,7 @@ const getElements = (machines, locale = {}, classes) => {
{
name: 'id',
header: 'Machine',
width: widthsByNumberOfCassettes[maxNumberOfCassettes].machine,
width: widthsByNumberOfCassettes[maxNumberOfCassettes]?.machine,
view: it => machines.find(({ deviceId }) => deviceId === it).name,
size: 'sm',
editable: false
@ -77,7 +77,7 @@ const getElements = (machines, locale = {}, classes) => {
size: 'sm',
stripe: true,
textAlign: 'right',
width: widthsByNumberOfCassettes[maxNumberOfCassettes].cassette,
width: widthsByNumberOfCassettes[maxNumberOfCassettes]?.cassette,
suffix: fiatCurrency,
bold: bold,
view: it => it,