diff --git a/ios/CameraView.swift b/ios/CameraView.swift index 4b8878c..98c039f 100644 --- a/ios/CameraView.swift +++ b/ios/CameraView.swift @@ -197,8 +197,8 @@ public final class CameraView: UIView { } // This is a wack workaround, but if I immediately set torch mode after `startRunning()`, the session isn't quite ready yet and will ignore torch. - self.cameraQueue.asyncAfter(deadline: .now() + 0.1) { - if shouldUpdateTorch { + if shouldUpdateTorch { + self.cameraQueue.asyncAfter(deadline: .now() + 0.1) { self.setTorchMode(self.torch) } }