Skip to content

Commit

Permalink
Merge pull request #364 from mprudhom/patch-1
Browse files Browse the repository at this point in the history
Remove an unnecessary optional force-unwrap
  • Loading branch information
bizz84 authored Jun 7, 2018
2 parents 26a0bd9 + 8ce303f commit 735c665
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SwiftyStoreKit/AppleReceiptValidator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public struct AppleReceiptValidator: ReceiptValidator {
}

// cannot decode data
guard let receiptInfo = try? JSONSerialization.jsonObject(with: data!, options: .mutableLeaves) as? ReceiptInfo ?? [:] else {
guard let receiptInfo = try? JSONSerialization.jsonObject(with: safeData, options: .mutableLeaves) as? ReceiptInfo ?? [:] else {
let jsonStr = String(data: safeData, encoding: String.Encoding.utf8)
completion(.error(error: .jsonDecodeError(string: jsonStr)))
return
Expand Down

0 comments on commit 735c665

Please sign in to comment.