Fix null normalising utility
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user