Commit 7c3ed64e authored by Tom Quirk's avatar Tom Quirk

Fix console errors from issuable_tabs

parent 4fba6a57
...@@ -27,7 +27,7 @@ export default { ...@@ -27,7 +27,7 @@ export default {
return tabName === this.currentTab; return tabName === this.currentTab;
}, },
isTabCountNumeric(tab) { isTabCountNumeric(tab) {
return Number.isInteger(this.tabCounts[tab.name]); return this.tabCounts ? Number.isInteger(this.tabCounts[tab.name]) : false;
}, },
}, },
}; };
...@@ -48,12 +48,13 @@ export default { ...@@ -48,12 +48,13 @@ export default {
<template #title> <template #title>
<span :title="tab.titleTooltip">{{ tab.title }}</span> <span :title="tab.titleTooltip">{{ tab.title }}</span>
<gl-badge <gl-badge
v-if="isTabCountNumeric(tab)" v-if="tabCounts && isTabCountNumeric(tab)"
variant="neutral" variant="neutral"
size="sm" size="sm"
class="gl-tab-counter-badge" class="gl-tab-counter-badge"
>{{ tabCounts[tab.name] }}</gl-badge
> >
{{ tabCounts[tab.name] }}
</gl-badge>
</template> </template>
</gl-tab> </gl-tab>
</gl-tabs> </gl-tabs>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment