Skip to content

Commit

Permalink
OpenFeature extra null safety (#158)
Browse files Browse the repository at this point in the history
  • Loading branch information
JamieSinn authored Jul 30, 2024
1 parent d5411fa commit c63c7af
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ private async Task FetchConfigAsyncWithTask()
{
var lastModified = res.Headers?.FirstOrDefault(e => e.Name?.ToLower() == "last-modified");
var etag = res.Headers?.FirstOrDefault(e => e.Name?.ToLower() == "etag");
if (configLastModified != "" && lastModified != null && (string)lastModified.Value != "")
if (!string.IsNullOrEmpty(configLastModified) && lastModified != null && !string.IsNullOrEmpty((string)lastModified.Value) )
{
var parsedHeader = Convert.ToDateTime((string)lastModified.Value);
var storedHeader = Convert.ToDateTime(configLastModified);
Expand Down

0 comments on commit c63c7af

Please sign in to comment.