mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-16 10:11:28 +00:00
Prevent null values from being censored
This commit is contained in:
parent
89556d5dfa
commit
d6788f0965
2 changed files with 24 additions and 9 deletions
|
@ -29,14 +29,26 @@ public class SlotSettingsPage : BaseLayout
|
|||
|
||||
if (avatarHash != null) this.Slot.IconHash = avatarHash;
|
||||
|
||||
name = CensorHelper.FilterMessage(name);
|
||||
if (this.Slot.Name != name && name.Length <= 64) this.Slot.Name = name;
|
||||
if (name != null)
|
||||
{
|
||||
name = CensorHelper.FilterMessage(name);
|
||||
if (this.Slot.Name != name && name.Length <= 64)
|
||||
this.Slot.Name = name;
|
||||
}
|
||||
|
||||
description = CensorHelper.FilterMessage(description);
|
||||
if (this.Slot.Description != description && description.Length <= 512) this.Slot.Description = description;
|
||||
if (description != null)
|
||||
{
|
||||
description = CensorHelper.FilterMessage(description);
|
||||
if (this.Slot.Description != description && description?.Length <= 512)
|
||||
this.Slot.Description = description;
|
||||
}
|
||||
|
||||
labels = LabelHelper.RemoveInvalidLabels(labels);
|
||||
if (this.Slot.AuthorLabels != labels) this.Slot.AuthorLabels = labels;
|
||||
if (labels != null)
|
||||
{
|
||||
labels = LabelHelper.RemoveInvalidLabels(labels);
|
||||
if (this.Slot.AuthorLabels != labels)
|
||||
this.Slot.AuthorLabels = labels;
|
||||
}
|
||||
|
||||
// ReSharper disable once InvertIf
|
||||
if (this.Database.ChangeTracker.HasChanges())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue