Skip to content

Commit

Permalink
Fix typing issue with possible null slot value
Browse files Browse the repository at this point in the history
Type 'null' is not assignable to type 'DataValuePoint'.
  • Loading branch information
davelopez committed Oct 31, 2023
1 parent 1e4d823 commit 1a3e0a1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ async function onPermanentlyDeleteHistory(historyId: string) {
</template>
<template v-slot:tooltip="{ data }">
<RecoverableItemSizeTooltip
v-if="data"
:data="data"
:is-recoverable="isRecoverableDataPoint(data)"
:is-archived="isArchivedDataPoint(data)" />
Expand Down Expand Up @@ -222,7 +223,10 @@ async function onPermanentlyDeleteHistory(historyId: string) {
:label-formatter="bytesLabelFormatter"
:value-formatter="bytesValueFormatter">
<template v-slot:tooltip="{ data }">
<RecoverableItemSizeTooltip :data="data" :is-recoverable="isRecoverableDataPoint(data)" />
<RecoverableItemSizeTooltip
v-if="data"
:data="data"
:is-recoverable="isRecoverableDataPoint(data)" />
</template>
</BarChart>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,10 @@ async function onPermanentlyDeleteDataset(datasetId: string) {
</b-form-select>
</template>
<template v-slot:tooltip="{ data }">
<RecoverableItemSizeTooltip :data="data" :is-recoverable="isRecoverableDataPoint(data)" />
<RecoverableItemSizeTooltip
v-if="data"
:data="data"
:is-recoverable="isRecoverableDataPoint(data)" />
</template>
<template v-slot:selection="{ data }">
<SelectedItemActions
Expand All @@ -221,7 +224,10 @@ async function onPermanentlyDeleteDataset(datasetId: string) {
:label-formatter="bytesLabelFormatter"
:value-formatter="bytesValueFormatter">
<template v-slot:tooltip="{ data }">
<RecoverableItemSizeTooltip :data="data" :is-recoverable="isRecoverableDataPoint(data)" />
<RecoverableItemSizeTooltip
v-if="data"
:data="data"
:is-recoverable="isRecoverableDataPoint(data)" />
</template>
</BarChart>
</div>
Expand Down

0 comments on commit 1a3e0a1

Please sign in to comment.