Skip to content

Commit a296597

Browse files
committed
fix: ensure Data is initialized with default value on empty Consul response
1 parent 5985246 commit a296597

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Infrastructures/Consul/Configuration/DefaultConsulConfigurationProvider.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ private void LoadData(QueryResult<KVPair> queryResult)
2323
|| queryResult.Response.Value == null
2424
|| queryResult.Response.Value.Length == 0)
2525
{
26-
Data = new Dictionary<string, string?>();
26+
Data = new Dictionary<string, string?>()
27+
{
28+
{ "nullContent",""}
29+
};
2730
return;
2831
}
2932
Stream stream = new MemoryStream(queryResult.Response.Value);

0 commit comments

Comments
 (0)