Skip to content

Commit fbde41b

Browse files
author
Brennan Stehling
committed
notifies for StorageBackgroundEventsRegistryWaiting only when notificationCenter is defined
1 parent cf0cd9a commit fbde41b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

AmplifyPlugins/Storage/Sources/AWSS3StoragePlugin/Support/Internal/StorageBackgroundEventsRegistry.swift

+1-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ actor StorageBackgroundEventsRegistry {
4242
/// - Parameters:
4343
/// - identifier: session identifier
4444
private static func notifyWaiting(for identifier: String) {
45-
let notificationCenter = notificationCenter ?? NotificationCenter.default
46-
notificationCenter.post(name: Notification.Name.StorageBackgroundEventsRegistryWaiting, object: identifier)
45+
notificationCenter?.post(name: Notification.Name.StorageBackgroundEventsRegistryWaiting, object: identifier)
4746
}
4847

4948
// The storage plugin will register the session identifier when it is configured.

0 commit comments

Comments
 (0)