From 72706d1d6fdd2a2c9961941d09ad2c68ff05caea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Su=C3=A1rez?= Date: Thu, 2 Feb 2023 01:52:41 +0100 Subject: [PATCH] Fix EvaluateJavaScriptAsync using Compatibility WebView Renderer (#12901) --- src/Controls/src/Core/WebView.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Controls/src/Core/WebView.cs b/src/Controls/src/Core/WebView.cs index 58e2ae91a26d..ae41abb07993 100644 --- a/src/Controls/src/Core/WebView.cs +++ b/src/Controls/src/Core/WebView.cs @@ -125,7 +125,7 @@ public async Task EvaluateJavaScriptAsync(string script) string result; - if (_evaluateJavaScriptRequested?.GetInvocationList().Length == 0) + if (_evaluateJavaScriptRequested != null) // With Handlers we don't use events, if is null we are using a renderer and a handler otherwise. { // This is the WebViewRenderer subscribing to these requests; the handler stuff // doesn't use them.