Skip to content

Commit f550dc8

Browse files
committed
chore: fixes reference comparison
Signed-off-by: Vincent Biret <[email protected]>
1 parent ab8286e commit f550dc8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/Microsoft.OpenApi/Models/References/OpenApiTagReference.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,12 @@ public OpenApiTagReference? Parent
6868
{
6969
get
7070
{
71-
var target = Target;
72-
if (target is OpenApiTagReference targetRef && ReferenceEquals(targetRef.Reference, this.Reference))
71+
if (Target is OpenApiTagReference targetRef && (Reference.Id?.Equals(targetRef.Reference.Id, StringComparison.Ordinal) ?? false))
7372
{
7473
return null;
7574
}
7675

77-
return target?.Parent;
76+
return Target?.Parent;
7877
}
7978
}
8079

0 commit comments

Comments
 (0)