Skip to content

Commit 91a46a1

Browse files
committed
Fix for possible null reference exceptions
1 parent 67c6a9f commit 91a46a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Stars.Services/Translator/DefaultStacTranslator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ private IItem CreateStacItemNode(IItem node)
100100
{
101101
if (!link.Uri.IsAbsoluteUri)
102102
continue;
103-
stacItem.Links.Add(new StacLink(link.Uri, link.Relationship, link.Title, link.ContentType.ToString()));
103+
stacItem.Links.Add(new StacLink(link.Uri, link.Relationship, link.Title, link.ContentType?.ToString()));
104104
}
105105
return new StacItemNode(stacItem, node.Uri);
106106
}

0 commit comments

Comments
 (0)