From fd546a060c4312d8b77293ebc6b7fc886edf28b8 Mon Sep 17 00:00:00 2001 From: DmitryZagorulko Date: Tue, 25 Sep 2018 10:48:25 +0300 Subject: [PATCH] fix problem with empty lines --- src/routing.go | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/routing.go b/src/routing.go index 6d5dca3..ccefcb4 100644 --- a/src/routing.go +++ b/src/routing.go @@ -728,14 +728,12 @@ func getOrderMessage(dataOrder *v1.MessageDataOrder) string { } } - if dataOrder.Delivery != nil { - if dataOrder.Delivery.Name != "" { - mb += fmt.Sprintf( - "\n*%s:*\n%s", - getLocalizedMessage("delivery"), - dataOrder.Delivery.Name, - ) - } + if dataOrder.Delivery.Name != "" { + mb += fmt.Sprintf( + "\n*%s:*\n%s", + getLocalizedMessage("delivery"), + dataOrder.Delivery.Name, + ) if dataOrder.Delivery.Amount != nil { if val, ok := currency[strings.ToLower(dataOrder.Delivery.Amount.Currency)]; ok && dataOrder.Delivery.Amount.Value != 0 {