Fix importing older export files

This commit is contained in:
Ske 2020-03-07 17:30:22 +01:00
parent 329a337518
commit a1d91784a0

View File

@ -274,8 +274,10 @@ namespace PluralKit.Core
// Sanity checks
!AvatarUrl.IsLongerThan(1000) &&
ProxyTags.Count < 100 &&
ProxyTags.All(t => !t.ProxyString.IsLongerThan(100)) &&
// Older versions have Prefix and Suffix as fields, meaning ProxyTags is null
(ProxyTags == null || ProxyTags.Count < 100 &&
ProxyTags.All(t => !t.ProxyString.IsLongerThan(100))) &&
!Prefix.IsLongerThan(100) && !Suffix.IsLongerThan(100);
}