mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-09-03 08:10:43 +00:00
Trim empty entries in string split calls
This commit is contained in:
parent
bff915e304
commit
e93aea1977
3 changed files with 4 additions and 5 deletions
|
@ -57,9 +57,7 @@
|
|||
}
|
||||
else
|
||||
{
|
||||
authorLabels = Model.Slot?.AuthorLabels.Split(",") ?? Array.Empty<string>();
|
||||
// Split() returns an array with an empty character for some reason
|
||||
if (authorLabels.Length == 1) authorLabels = Array.Empty<string>();
|
||||
authorLabels = Model.Slot?.AuthorLabels.Split(",", StringSplitOptions.RemoveEmptyEntries) ?? Array.Empty<string>();
|
||||
}
|
||||
if (authorLabels.Length == 0)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue