aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorn1t0r <git@n1t0r.com>2023-04-15 21:27:48 +1000
committern1t0r <git@n1t0r.com>2023-04-15 21:27:48 +1000
commit8feb6b48c79e947f6635e35aed13fffebab5a2aa (patch)
tree7200efc14dc2b01b59fb5c1a1b65456e883114b1
parent5352244d0166d34620897eeae0efa71801f48fae (diff)
downloadsteady-8feb6b48c79e947f6635e35aed13fffebab5a2aa.tar.gz
steady-8feb6b48c79e947f6635e35aed13fffebab5a2aa.tar.bz2
steady-8feb6b48c79e947f6635e35aed13fffebab5a2aa.zip
Fix empty tag panic if not registered.
-rw-r--r--queue.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/queue.go b/queue.go
index 88dccba..e2441c9 100644
--- a/queue.go
+++ b/queue.go
@@ -97,7 +97,7 @@ func (q *Queue[K]) init() {
// return.
func (q *Queue[K]) Push(item Item[K]) (ok bool) {
q.once.Do(q.init)
- if t, ok1 := item.(Tagged); ok1 {
+ if t, ok1 := item.(Tagged); ok1 && t.Tag() != "" {
tc := q.tagCount[t.Tag()]
if tc == nil {
// Item is tagged but the tag doesn't exist. Programmer error; this