Skip to content

Commit 4f28b65

Browse files
committed
fix: extensions collection initialization
Signed-off-by: Vincent Biret <[email protected]>
1 parent 84e83f4 commit 4f28b65

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Microsoft.OpenApi/Models/OpenApiExtensibleDictionary.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ protected OpenApiExtensibleDictionary(
2626
Dictionary<string, T> dictionary = null,
2727
IDictionary<string, IOpenApiExtension> extensions = null) : base(dictionary is null ? [] : dictionary)
2828
{
29-
Extensions = extensions != null ? new Dictionary<string, IOpenApiExtension>(extensions) : null;
29+
Extensions = extensions != null ? new Dictionary<string, IOpenApiExtension>(extensions) : [];
3030
}
3131

3232
/// <summary>
3333
/// This object MAY be extended with Specification Extensions.
3434
/// </summary>
35-
public IDictionary<string, IOpenApiExtension> Extensions { get; set; } = new Dictionary<string, IOpenApiExtension>();
35+
public IDictionary<string, IOpenApiExtension> Extensions { get; set; }
3636

3737

3838
/// <summary>

0 commit comments

Comments
 (0)