Skip to content

Commit ca2fb14

Browse files
author
Baris Sencan
committed
Duh
1 parent c248496 commit ca2fb14

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

JSONHelper/JSONHelper.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ public func <-- <T>(inout property: T?, value: AnyObject?) -> T? {
7272
case is NSURL?:
7373
newValue = NSURL(string: "\(unwrappedValue)") as? T
7474
case is NSDate?:
75-
if let timestamp = value as? Int {
75+
if let timestamp = unwrappedValue as? Int {
7676
newValue = NSDate(timeIntervalSince1970: Double(timestamp)) as? T
77-
} else if let timestamp = value as? Double {
77+
} else if let timestamp = unwrappedValue as? Double {
7878
newValue = NSDate(timeIntervalSince1970: timestamp) as? T
79-
} else if let timestamp = value as? NSNumber {
79+
} else if let timestamp = unwrappedValue as? NSNumber {
8080
newValue = NSDate(timeIntervalSince1970: timestamp.doubleValue) as? T
8181
}
8282
default:

0 commit comments

Comments
 (0)