From a405675ddbf4be8d7546221f53886bf86a0c98c0 Mon Sep 17 00:00:00 2001 From: Daniel Kift Date: Wed, 22 Nov 2023 13:23:37 +0000 Subject: [PATCH] if expression over statement --- .../main/java/com/shopify/checkoutkit/CheckoutWebView.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/src/main/java/com/shopify/checkoutkit/CheckoutWebView.kt b/lib/src/main/java/com/shopify/checkoutkit/CheckoutWebView.kt index bccda3b0..ba328e44 100644 --- a/lib/src/main/java/com/shopify/checkoutkit/CheckoutWebView.kt +++ b/lib/src/main/java/com/shopify/checkoutkit/CheckoutWebView.kt @@ -120,15 +120,16 @@ internal class CheckoutWebView(context: Context, attributeSet: AttributeSet? = n } override fun onRenderProcessGone(view: WebView, detail: RenderProcessGoneDetail): Boolean { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && !detail.didCrash()) { + return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && !detail.didCrash()) { // Renderer was killed because system ran out of memory. // Removing the view from `CheckoutWebViewContainer will trigger a cache clear // and call webView.destroy() (view.parent as ViewGroup).removeView(view) - return true + true + } else { + false } - return false } override fun shouldOverrideUrlLoading(