Skip to content

Commit

Permalink
Ensure authorization callback only after response
Browse files Browse the repository at this point in the history
  • Loading branch information
basememara committed Nov 2, 2019
1 parent 73dc053 commit 70eeae1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Sources/ZamzamLocation/LocationWorker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,8 @@ public extension LocationWorker {
extension LocationWorker: CLLocationManagerDelegate {

public func locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) {
guard status != .notDetermined else { return }

// Trigger and empty queues
let recurringHandlers = self.didChangeAuthorizationHandlers.value
recurringHandlers.forEach { task in
Expand Down

0 comments on commit 70eeae1

Please sign in to comment.