From f85e44d69a35425487c6ced2f0b28d8aa7c1e8c0 Mon Sep 17 00:00:00 2001 From: timerzz Date: Sun, 5 May 2024 21:57:14 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=E6=B2=A1=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E5=88=B0detail=E5=90=8E=E7=A9=BA=E6=8C=87=E9=92=88?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/watcher/coach.go | 3 +++ 1 file changed, 3 insertions(+) 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)