Procházet zdrojové kódy

Fixed iOS crash due to force unwrap of nil

flutter-beta
Kamil Powałowski před 6 roky
committed by Dominik Spicher
rodič
revize
cb49651d73
1 změnil soubory, kde provedl 2 přidání a 4 odebrání
  1. +2
    -4
      ios/Classes/QRView.swift

+ 2
- 4
ios/Classes/QRView.swift Zobrazit soubor

@@ -26,10 +26,8 @@ public class QRView:NSObject,FlutterPlatformView {
try scanner?.startScanning(resultBlock: { codes in
if let codes = codes {
for code in codes {
if (code != nil && code.stringValue != nil) {
let stringValue = code.stringValue!
self.channel.invokeMethod("onRecognizeQR", arguments: stringValue)
}
guard let stringValue = code.stringValue else { continue }
self.channel.invokeMethod("onRecognizeQR", arguments: stringValue)
}
}
})


Načítá se…
Zrušit
Uložit