bug fix for allowFrom contains empty string
This commit is contained in:
parent
7db2e7d579
commit
036f65b179
1 changed files with 10 additions and 0 deletions
|
|
@ -103,6 +103,16 @@ func NewBaseChannel(
|
|||
allowList []string,
|
||||
opts ...BaseChannelOption,
|
||||
) *BaseChannel {
|
||||
isEmpty := true
|
||||
for _, s := range allowList {
|
||||
if s != "" {
|
||||
isEmpty = false
|
||||
break
|
||||
}
|
||||
}
|
||||
if isEmpty {
|
||||
allowList = []string{}
|
||||
}
|
||||
bc := &BaseChannel{
|
||||
config: config,
|
||||
bus: bus,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue