Skip to content

Commit cb0a898

Browse files
committed
cleanup
1 parent f9308ed commit cb0a898

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Templateless/TemplatelessClient.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public async Task<List<string>> SendEmailsAsync(List<Email> emails)
5757
var responseContent = await response.Content.ReadAsStringAsync();
5858
var res = JsonConvert.DeserializeObject<EmailResponse>(responseContent);
5959

60-
if (res.Previews != null)
60+
if (res?.Previews != null)
6161
{
6262
foreach (var preview in res.Previews)
6363
{
@@ -85,9 +85,9 @@ private ErrorType ParseErrorType(HttpStatusCode statusCode)
8585
public class EmailResponsePreview
8686
{
8787
[JsonProperty("preview")]
88-
public string Preview { get; set; }
88+
public string? Preview { get; set; }
8989
[JsonProperty("email")]
90-
public string Email { get; set; }
90+
public string? Email { get; set; }
9191
}
9292

9393
public class EmailResponse

0 commit comments

Comments
 (0)