Skip to content

Commit 2763b6e

Browse files
committed
QuerySet.subscript: fixed subscript from an optional
1 parent 34f55b8 commit 2763b6e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

QueryKit/QuerySet.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public class QuerySet<T : NSManagedObject> : SequenceType, Equatable {
104104
var error:NSError?
105105
let items = context.executeFetchRequest(request, error:&error)
106106

107-
return (object:items[0] as? T, error:error)
107+
return (object:items?[0] as T?, error:error)
108108
}
109109
}
110110

0 commit comments

Comments
 (0)