Skip to content

Commit bad7879

Browse files
authored
Merge pull request #6 from AcidSailor/main
fix(outputs): AddSubscriptionTarget correct return with empty addTarget
2 parents b88c9fc + df630f5 commit bad7879

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

outputs/output.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ func DecodeConfig(src, dst interface{}) error {
8181

8282
func AddSubscriptionTarget(msg proto.Message, meta Meta, addTarget string, tpl *template.Template) (*gnmi.SubscribeResponse, error) {
8383
if addTarget == "" {
84+
if message, ok := msg.(*gnmi.SubscribeResponse); ok {
85+
return message, nil
86+
}
8487
return nil, nil
8588
}
8689
msg = proto.Clone(msg)

0 commit comments

Comments
 (0)