Skip to content

Commit

Permalink
fix: Only throw if no entry was found at all
Browse files Browse the repository at this point in the history
  • Loading branch information
MH321Productions committed Dec 19, 2024
1 parent 7c407e2 commit 3853c02
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ private NotificationText GetNotificationTextFromResourceManager(Type pushNotific
var title = _resourceManager.GetString(titleKey, culture);
var body = _resourceManager.GetString(bodyKey, culture);

if (title.IsNullOrEmpty())
if (title == null)
throw new MissingPushNotificationTextException($"Title for notification type '{pushNotificationTypeName}' not found.");

if (body.IsNullOrEmpty())
if (body == null)
throw new MissingPushNotificationTextException($"Body for notification type '{pushNotificationTypeName}' not found.");

return new NotificationText(title, body);
Expand Down

0 comments on commit 3853c02

Please sign in to comment.