Skip to content

Commit

Permalink
fix #306: fixed creation of GPSLocationRequest via builder block of G…
Browse files Browse the repository at this point in the history
…PSLocationOptions
  • Loading branch information
malcommac committed Nov 28, 2020
1 parent e13f618 commit 148bf1f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/SwiftLocation/SwiftLocation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,9 @@ public class LocationManager: LocationManagerDelegate, CustomStringConvertible {
/// - Returns: `LocationRequest`
@discardableResult
public func gpsLocationWith(_ optionsBuilder: ((GPSLocationOptions) -> Void)) -> GPSLocationRequest {
let newRequest = GPSLocationRequest()
optionsBuilder(newRequest.options)
return gpsRequests.add(newRequest)
let options = GPSLocationOptions()
optionsBuilder(options)
return gpsLocationWith(options)
}

/// Get the location with GPS module with given options.
Expand Down

0 comments on commit 148bf1f

Please sign in to comment.