Fix crash when logging without widget items

This commit is contained in:
Shadowfacts 2023-01-14 12:16:33 -05:00
parent 0b52df4369
commit 002c931d26
1 changed files with 3 additions and 1 deletions

View File

@ -54,7 +54,9 @@ struct WidgetHelper {
}
}
logger.info("Saving widget data with first item: '\(prioritizedItems.first!.title ?? "<untitled>", privacy: .public)'")
if let item = prioritizedItems.first {
logger.info("Saving widget data with first item: '\(item.title ?? "<untitled>", privacy: .public)'")
}
WidgetData(recentItems: prioritizedItems).save(account: fervorController.account!)