From 1b26d5d76cf99befe6f8e5722b9340d5fc270d4f Mon Sep 17 00:00:00 2001 From: Bobby Sudekum Date: Thu, 7 Sep 2017 10:38:46 -0400 Subject: [PATCH] optional --- MapboxDirections/MBRoute.swift | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/MapboxDirections/MBRoute.swift b/MapboxDirections/MBRoute.swift index afb60d5e2..347908b00 100644 --- a/MapboxDirections/MBRoute.swift +++ b/MapboxDirections/MBRoute.swift @@ -69,10 +69,7 @@ open class Route: NSObject, NSSecureCoding { } routeOptions = options - guard let decodedRouteIdentifier = decoder.decodeObject(of: NSString.self, forKey: "routeIdentifier") as String? else { - return nil - } - routeIdentifier = decodedRouteIdentifier + routeIdentifier = decoder.decodeObject(of: NSString.self, forKey: "routeIdentifier") as String? } open static var supportsSecureCoding = true