Skip to content

Commit

Permalink
Check correct properties to write in LinksConverter (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
jchannon committed Oct 21, 2021
1 parent cd984f2 commit c524b9c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Hallo/Serialization/LinksConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,19 +96,19 @@ private void WriteLink(Utf8JsonWriter writer, in Link link)
}
break;
case nameof(Link.Title):
if (link.Profile != null)
if (link.Title != null)
{
writer.WriteString("title", link.Title);
}
break;
case nameof(Link.Type):
if (link.Profile != null)
if (link.Type != null)
{
writer.WriteString("type", link.Type);
}
break;
case nameof(Link.HrefLang):
if (link.Profile != null)
if (link.HrefLang != null)
{
writer.WriteString("hreflang", link.HrefLang);
}
Expand All @@ -119,4 +119,4 @@ private void WriteLink(Utf8JsonWriter writer, in Link link)
writer.WriteEndObject();
}
}
}
}

0 comments on commit c524b9c

Please sign in to comment.