Skip to content

Commit

Permalink
Merge pull request #15 from linsyorozuya/master
Browse files Browse the repository at this point in the history
fix crash when val is NSNull
  • Loading branch information
s4cha authored Nov 11, 2020
2 parents c693b36 + a821d40 commit 9608676
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Networking/NetworkingParser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public struct NetworkingParser {

private func resourceData(from json: Any, keypath: String?) -> Any {
if let keypath = keypath, !keypath.isEmpty, let dic = json as? [String: Any], let val = dic[keypath] {
return val
return val is NSNull ? json : val
}
return json
}
Expand Down

0 comments on commit 9608676

Please sign in to comment.