Skip to content

Commit

Permalink
fix: Resolve wrong filter results (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
KafuuEriri committed Nov 10, 2023
1 parent 133a1ea commit 519baf7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nacos/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func (n *nacosResolver) Resolve(_ context.Context, desc string) (discovery.Resul
}
instances := make([]discovery.Instance, 0, len(res))
for _, ins := range res {
if !ins.Enable || !compareMaps(ins.Metadata, metadata) {
if !ins.Enable || (len(metadata) > 0 && !compareMaps(ins.Metadata, metadata)) {
continue
}

Expand Down

0 comments on commit 519baf7

Please sign in to comment.