diff --git a/src/System.Reactive.Wasm/Internal/WasmPlatformEnlightenmentProvider.cs b/src/System.Reactive.Wasm/Internal/WasmPlatformEnlightenmentProvider.cs index b7da473..e44f87a 100644 --- a/src/System.Reactive.Wasm/Internal/WasmPlatformEnlightenmentProvider.cs +++ b/src/System.Reactive.Wasm/Internal/WasmPlatformEnlightenmentProvider.cs @@ -30,8 +30,10 @@ public class WasmPlatformEnlightenmentProvider : CurrentPlatformEnlightenmentPro new Thread(() => { }).Start(); return false; } - catch (NotSupportedException) + catch (Exception) { + // Usually a TypeInitializationException, however be safe by considering any platform + // that does not support threading as "Wasm". return true; } }, LazyThreadSafetyMode.PublicationOnly);