From 4823589348ba90de6af4735dbe6fa7cb8f00d877 Mon Sep 17 00:00:00 2001 From: Ringo Hoffmann Date: Wed, 6 Oct 2021 10:41:44 +0200 Subject: [PATCH] fix unregister call on command store usage --- ken.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ken.go b/ken.go index edfa336..e2fdb0e 100644 --- a/ken.go +++ b/ken.go @@ -181,7 +181,7 @@ func (k *Ken) RegisterMiddlewares(mws ...interface{}) (err error) { // This can be skipped if you are using // a CommandStore. func (k *Ken) Unregister() (err error) { - if len(k.idcache) == 0 { + if k.opt.CommandStore != nil { return }