re-added the workaround to ensure we don't create the label collection unnecessarily

This commit is contained in:
Brendan Forster
2015-02-24 12:40:34 +09:30
parent 0d271856b8
commit bf4985b27c
+6 -5
View File
@@ -9,11 +9,6 @@ namespace Octokit
[DebuggerDisplay("{DebuggerDisplay,nq}")]
public class IssueUpdate
{
public IssueUpdate()
{
Labels = new List<string>();
}
/// <summary>
/// Title of the milestone (required)
/// </summary>
@@ -66,6 +61,12 @@ namespace Octokit
public void AddLabel(string name)
{
// lazily create the label array
if (Labels == null)
{
Labels = new List<string>();
}
Labels.Add(name);
}
}