fix: Initialize ImmutableArray fields (#1292)

This commit is contained in:
Joe4evr
2019-03-26 21:51:15 +01:00
committed by Christopher F
parent dffbc656fd
commit b2ebc03da7
2 changed files with 7 additions and 7 deletions

View File

@@ -16,10 +16,10 @@ namespace Discord.Rest
{
private bool _isMentioningEveryone, _isTTS, _isPinned;
private long? _editedTimestampTicks;
private ImmutableArray<Attachment> _attachments;
private ImmutableArray<Embed> _embeds;
private ImmutableArray<ITag> _tags;
private ImmutableArray<RestReaction> _reactions;
private ImmutableArray<Attachment> _attachments = ImmutableArray.Create<Attachment>();
private ImmutableArray<Embed> _embeds = ImmutableArray.Create<Embed>();
private ImmutableArray<ITag> _tags = ImmutableArray.Create<ITag>();
private ImmutableArray<RestReaction> _reactions = ImmutableArray.Create<RestReaction>();
/// <inheritdoc />
public override bool IsTTS => _isTTS;

View File

@@ -18,9 +18,9 @@ namespace Discord.WebSocket
private readonly List<SocketReaction> _reactions = new List<SocketReaction>();
private bool _isMentioningEveryone, _isTTS, _isPinned;
private long? _editedTimestampTicks;
private ImmutableArray<Attachment> _attachments;
private ImmutableArray<Embed> _embeds;
private ImmutableArray<ITag> _tags;
private ImmutableArray<Attachment> _attachments = ImmutableArray.Create<Attachment>();
private ImmutableArray<Embed> _embeds = ImmutableArray.Create<Embed>();
private ImmutableArray<ITag> _tags = ImmutableArray.Create<ITag>();
/// <inheritdoc />
public override bool IsTTS => _isTTS;