Skip to content

Commit

Permalink
null check for mail config
Browse files Browse the repository at this point in the history
  • Loading branch information
hargata committed Apr 25, 2024
1 parent f6139bd commit 49184b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Helper/MailHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public MailHelper(
ILogger<MailHelper> logger
) {
//load mailConfig from Configuration
mailConfig = config.GetSection("MailConfig").Get<MailConfig>();
mailConfig = config.GetSection("MailConfig").Get<MailConfig>() ?? new MailConfig();
_fileHelper = fileHelper;
_logger = logger;
}
Expand Down

0 comments on commit 49184b2

Please sign in to comment.