[iOS] Avoid continuation misuse in Leo WebUI photo picker (#35974)

This is a speculative fix for the Photos picker calling the `didFinishPicking` delegate method more than once by ensuring that the continuation is niled out after a single use.
This commit is contained in:
Kyle Hickinson
2026-04-28 15:26:37 -04:00
committed by GitHub
parent a6b9c94ec8
commit e9f4285068
@@ -197,6 +197,7 @@ extension BrowserViewController {
var continuation: CheckedContinuation<[PHPickerResult], Never>?
func picker(_ picker: PHPickerViewController, didFinishPicking results: [PHPickerResult]) {
continuation?.resume(returning: results)
continuation = nil
picker.dismiss(animated: true)
}
}