Skip to content

Commit c053719

Browse files
committed
fix: provide default message for missing old values in tooltips
1 parent b0f07cf commit c053719

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

custom/VisionTable.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
<p class="text-sm ">{{ $t('old value') }}</p>
8484
</div>
8585
<template #tooltip>
86-
{{ oldData[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])][n] }}
86+
{{ oldData[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])][n] ?? "No old value" }}
8787
</template>
8888
</Tooltip>
8989
</div>
@@ -99,7 +99,7 @@
9999
<p class="text-sm ">{{ $t('old value') }}</p>
100100
</div>
101101
<template #tooltip>
102-
<p class="max-w-[200px]">{{ oldData[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])][n] }}</p>
102+
<p class="max-w-[200px]">{{ oldData[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])][n] ?? "No old value" }}</p>
103103
</template>
104104
</Tooltip>
105105
</div>
@@ -114,7 +114,7 @@
114114
<p class="text-sm ">{{ $t('old value') }}</p>
115115
</div>
116116
<template #tooltip>
117-
{{ oldData[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])][n] }}
117+
{{ oldData[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])][n] ?? "No old value" }}
118118
</template>
119119
</Tooltip>
120120
</div>
@@ -130,7 +130,7 @@
130130
<p class="text-sm ">{{ $t('old value') }}</p>
131131
</div>
132132
<template #tooltip>
133-
{{ oldData[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])][n] }}
133+
{{ oldData[tableColumnsIndexes.findIndex(el => el[primaryKey] === item[primaryKey])][n] ?? "No old value" }}
134134
</template>
135135
</Tooltip>
136136
</div>

0 commit comments

Comments
 (0)