Fix null normalising utility

This commit is contained in:
Ske 2019-12-02 16:56:35 +01:00
parent 55f77df39e
commit 530e3aa697

View File

@ -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;
} }
} }