Null or empty check for FormatContent
Added null or empty check for the content and alias parameters at the beginning of the method.
This commit is contained in:
parent
7e7d83ac36
commit
4f5b33d8df
|
@ -139,6 +139,9 @@ namespace Oqtane.Shared
|
||||||
|
|
||||||
public static string FormatContent(string content, Alias alias, string operation)
|
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 : "";
|
var aliasUrl = (alias != null && !string.IsNullOrEmpty(alias.Path)) ? "/" + alias.Path : "";
|
||||||
switch (operation)
|
switch (operation)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user