Skip to content

Commit ecbe1dc

Browse files
author
Sandy Zhou
authored
Merge pull request #39 from meshplus/fix/support-argsCb-null
fix(*): modify function handleArgs to fix a bug when argsCb is null
2 parents fd7b855 + f946946 commit ecbe1dc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

event.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ func Convert2IBTP(ev *BrokerThrowEvent, timeoutHeight int64, ibtpType pb.IBTP_Ty
2727

2828
func handleArgs(args string) [][]byte {
2929
argsBytes := make([][]byte, 0)
30+
if len(args) == 0 {
31+
return argsBytes
32+
}
3033
as := strings.Split(args, ",")
3134
for _, a := range as {
3235
argsBytes = append(argsBytes, []byte(a))

0 commit comments

Comments
 (0)