Merge pull request #4218 from leigh-pointer/CheckNullString

Null or empty check for FormatContent
This commit is contained in:
Shaun Walker 2024-05-02 07:43:39 -04:00 committed by GitHub
commit d58d22adbe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -139,6 +139,9 @@ namespace Oqtane.Shared
public static string FormatContent(string content, Alias alias, string operation)
{
if (string.IsNullOrEmpty(content) || alias == null)
return content;
var aliasUrl = (alias != null && !string.IsNullOrEmpty(alias.Path)) ? "/" + alias.Path : "";
switch (operation)
{