Skip to content

Commit

Permalink
fix: rm ?? operator from template
Browse files Browse the repository at this point in the history
  • Loading branch information
annacv committed Oct 26, 2023
1 parent 0afd27a commit 59a7de0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/components/my-history/custom-my-history.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
class="x-text1-sm x-text-lead-50 x-line-clamp-1"
>
<span v-for="filter in suggestion.selectedFilters" :key="filter.id" class="x-pr-8">
{{ filter.label ?? filter.id }}
{{ label(filter) }}
</span>
</p>

Expand Down Expand Up @@ -71,8 +71,13 @@
HistoryQuery
},
setup() {
const label = (filter: Record<string, string>): string => {
return filter.label ?? filter.id;
};
return {
animation: StaggeredFadeAndSlide
animation: StaggeredFadeAndSlide,
label
};
}
});
Expand Down

0 comments on commit 59a7de0

Please sign in to comment.