Fix null normalising utility
This commit is contained in:
parent
55f77df39e
commit
530e3aa697
@ -249,7 +249,9 @@ namespace PluralKit
|
|||||||
|
|
||||||
public static string NullIfEmpty(this string input)
|
public static string NullIfEmpty(this string input)
|
||||||
{
|
{
|
||||||
return input.Trim().Length == 0 ? null : input;
|
if (input == null) return null;
|
||||||
|
if (input.Trim().Length == 0) return null;
|
||||||
|
return input;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user