Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
4kimov committed Mar 6, 2024
1 parent f9308ed commit cb0a898
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Templateless/TemplatelessClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public async Task<List<string>> SendEmailsAsync(List<Email> emails)
var responseContent = await response.Content.ReadAsStringAsync();
var res = JsonConvert.DeserializeObject<EmailResponse>(responseContent);

if (res.Previews != null)
if (res?.Previews != null)
{
foreach (var preview in res.Previews)
{
Expand Down Expand Up @@ -85,9 +85,9 @@ private ErrorType ParseErrorType(HttpStatusCode statusCode)
public class EmailResponsePreview
{
[JsonProperty("preview")]
public string Preview { get; set; }
public string? Preview { get; set; }
[JsonProperty("email")]
public string Email { get; set; }
public string? Email { get; set; }
}

public class EmailResponse
Expand Down

0 comments on commit cb0a898

Please sign in to comment.