diff --git a/ios/Classes/InAppWebView/InAppWebView.swift b/ios/Classes/InAppWebView/InAppWebView.swift index f49fcef7..c6cc38d8 100755 --- a/ios/Classes/InAppWebView/InAppWebView.swift +++ b/ios/Classes/InAppWebView/InAppWebView.swift @@ -670,17 +670,17 @@ public class InAppWebView: WKWebView, UIScrollViewDelegate, WKUIDelegate, WKNavi switch with["compressFormat"] as! String { case "JPEG": let quality = Float(with["quality"] as! Int) / 100 - imageData = screenshot.jpegData(compressionQuality: CGFloat(quality))! + imageData = screenshot.jpegData(compressionQuality: CGFloat(quality)) break case "PNG": - imageData = screenshot.pngData()! + imageData = screenshot.pngData() break default: - imageData = screenshot.pngData()! + imageData = screenshot.pngData() } } else { - imageData = screenshot.pngData()! + imageData = screenshot.pngData() } } completionHandler(imageData)