From d7f83a45b3db6d742800c9c139ea743f89fe2727 Mon Sep 17 00:00:00 2001 From: c9s Date: Fri, 8 Jul 2022 14:47:36 +0800 Subject: [PATCH] fix: check if interval is empty string --- pkg/types/kline.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/types/kline.go b/pkg/types/kline.go index 529d30d95..d510b8b48 100644 --- a/pkg/types/kline.go +++ b/pkg/types/kline.go @@ -609,7 +609,7 @@ type KLineCallBack func(k KLine) func KLineWith(symbol string, interval Interval, callback KLineCallBack) KLineCallBack { return func(k KLine) { - if k.Symbol != symbol || k.Interval != interval { + if k.Symbol != symbol || (k.Interval != "" && k.Interval != interval) { return } callback(k)