Skip to content

Commit b5eae9f

Browse files
committed
fix: Main actor-isolated property 'logger' can not be referenced from a Sendable closure 해결
1 parent 952d7b1 commit b5eae9f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

DevLog/Presentation/ViewModel/MainViewModel.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@ private extension MainViewModel {
108108
func updateBadgeCount(_ count: Int) {
109109
UNUserNotificationCenter.current().setBadgeCount(count) { [weak self] error in
110110
if let error {
111-
self?.logger.error("Failed to update application badge count", error: error)
111+
Task { @MainActor in
112+
self?.logger.error("Failed to update application badge count", error: error)
113+
}
112114
}
113115
}
114116
}

0 commit comments

Comments
 (0)