From 10e316f541ea0d6b3a941e41c62f09d5baabe329 Mon Sep 17 00:00:00 2001 From: Larry Ewing Date: Mon, 6 May 2019 17:38:50 -0500 Subject: [PATCH] Remove the exception filter that is problematic for wasm AOT \n\nCommit migrated from https://github.com/dotnet/extensions/commit/b3cdc7bd5d46a70ae2e0294c750da78c659f04fe --- .../Microsoft.JSInterop/src/DotNetDispatcher.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/JSInterop/Microsoft.JSInterop/src/DotNetDispatcher.cs b/src/JSInterop/Microsoft.JSInterop/src/DotNetDispatcher.cs index ac936e670a..20904e1bf0 100644 --- a/src/JSInterop/Microsoft.JSInterop/src/DotNetDispatcher.cs +++ b/src/JSInterop/Microsoft.JSInterop/src/DotNetDispatcher.cs @@ -171,10 +171,15 @@ namespace Microsoft.JSInterop { return methodInfo.Invoke(targetInstance, suppliedArgs); } - catch (TargetInvocationException tie) when (tie.InnerException != null) + catch (TargetInvocationException tie) { - ExceptionDispatchInfo.Capture(tie.InnerException).Throw(); - throw null; // unreachable + if (tie.InnerException != null) + { + ExceptionDispatchInfo.Capture(tie.InnerException).Throw(); + throw null; // unreached + } + + throw; } }