Skip to content

Commit

Permalink
Properly decode locale optional (#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bobby Sudekum committed Oct 11, 2017
1 parent b3b991b commit 1433dc5
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions MapboxDirections/MBRouteOptions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,7 @@ open class RouteOptions: NSObject, NSSecureCoding {

includesExitRoundaboutManeuver = decoder.decodeBool(forKey: "includesExitRoundaboutManeuver")

guard let locale = decoder.decodeObject(of: NSLocale.self, forKey: "locale") as Locale? else {
return nil
}
self.locale = locale
locale = decoder.decodeObject(of: NSLocale.self, forKey: "locale") as Locale?

includesVoiceInstructions = decoder.decodeBool(forKey: "includeVoiceInstructions")
}
Expand Down

0 comments on commit 1433dc5

Please sign in to comment.