Skip to content

Commit

Permalink
Make sure objects are mapped lazily
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksii Dykan committed Jan 20, 2017
1 parent 7eaab7b commit 44e5214
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SwiftyJSONModel/JSONObject.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public extension JSONObject where PropertyType.RawValue == String {
let key = keyPath[0]
do {
if keyPath.count == 1 {
return try self[key].arrayValue().enumerated().map({ index, json in
return try self[key].arrayValue().enumerated().lazy.map({ index, json in
do {
return try T(json: json)
} catch let error as JSONModelError {
Expand Down

0 comments on commit 44e5214

Please sign in to comment.