Skip to content

Commit 82ad2c5

Browse files
dr1rrbglennawatson
authored andcommitted
Fix invalid exception filter resulting to a crash at startup (#4)
1 parent 348e789 commit 82ad2c5

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/System.Reactive.Wasm/Internal/WasmPlatformEnlightenmentProvider.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ public class WasmPlatformEnlightenmentProvider : CurrentPlatformEnlightenmentPro
3030
new Thread(() => { }).Start();
3131
return false;
3232
}
33-
catch (NotSupportedException)
33+
catch (Exception)
3434
{
35+
// Usually a TypeInitializationException, however be safe by considering any platform
36+
// that does not support threading as "Wasm".
3537
return true;
3638
}
3739
}, LazyThreadSafetyMode.PublicationOnly);

0 commit comments

Comments
 (0)