diff --git a/pkg/watcher/coach.go b/pkg/watcher/coach.go index fd95bad..3d12cec 100644 --- a/pkg/watcher/coach.go +++ b/pkg/watcher/coach.go @@ -110,6 +110,9 @@ func (c *CoachOutlet) Watch() { } func (c *CoachOutlet) getInventory() bool { + if c.detail == nil { + return false + } // 请求 subCtx, cancel := context.WithTimeout(c.ctx, time.Minute*5) inventory, err := c.requestProductInventory(subCtx)