Tabs · console.warn
tabs: tab "{id}" - its badge function threw ({error}); no badge is shown.
Printed by Tabs, prefixed [lattice], since 1.59.0.
Warnings reference › tabs.badge.fn:*
- Identifier
tabs.badge.fn:*- Raised by
- Tabs
- Since
- 1.59.0
What happened
The tab's badge function was called with the live count and threw. The strip catches it so one bad badge cannot take down the whole tab strip, and draws the tab with no badge. The count itself is unaffected - only the text your function would have produced is missing.
The fix
The thrown message is quoted in the line. A badge function is called with (count, tab) and count is null while the count is still unknown, which is the usual cause.
The smallest fix
badge: (count) => (count === null ? '…' : String(count))
Reference
Covered in full at the API reference.