Skip to content

Commit

Permalink
Shorten conditional statement checking hyperlink for a different data…
Browse files Browse the repository at this point in the history
…base
  • Loading branch information
JakeOliver28 committed Jun 28, 2024
1 parent 34cde00 commit fe28e1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Src/xWorks/LinkListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ private bool FollowActiveLink(bool suspendLoadingRecord)
}
// Return false if the link is to a different database
var databases = m_lnkActive.PropertyTableEntries.Where(p => p.name == "database");
if (databases.Any() && databases.First().name != cache.LangProject.ShortName)
if (databases.FirstOrDefault()?.name != cache.LangProject.ShortName)
{
return false;
}
Expand Down

0 comments on commit fe28e1d

Please sign in to comment.