Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/sdks
diff options
context:
space:
mode:
authorKenneth Pouncey <kjpou@pt.lu>2019-10-21 06:23:46 +0300
committerLarry Ewing <lewing@microsoft.com>2019-10-21 18:27:05 +0300
commit7e522ef179441d75580be33d01c119dfafd385ae (patch)
treec29eeae9486c03fc690e0c18e5611b696d5e5e08 /sdks
parent21d7d41bfe4a8aebed8e73deadd1fb1177360392 (diff)
Modify the check for streaming to also check that the browser `Response` object exists.
Diffstat (limited to 'sdks')
-rw-r--r--sdks/wasm/framework/src/WebAssembly.Net.Http/WasmHttpMessageHandler.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/sdks/wasm/framework/src/WebAssembly.Net.Http/WasmHttpMessageHandler.cs b/sdks/wasm/framework/src/WebAssembly.Net.Http/WasmHttpMessageHandler.cs
index f4b8fdc8714..a683fb7692e 100644
--- a/sdks/wasm/framework/src/WebAssembly.Net.Http/WasmHttpMessageHandler.cs
+++ b/sdks/wasm/framework/src/WebAssembly.Net.Http/WasmHttpMessageHandler.cs
@@ -38,7 +38,7 @@ namespace WebAssembly.Net.Http.HttpClient {
static WasmHttpMessageHandler ()
{
- using (var streamingSupported = new Function ("return 'body' in Response.prototype && typeof ReadableStream === 'function'"))
+ using (var streamingSupported = new Function ("return typeof Response !== 'undefined' && 'body' in Response.prototype && typeof ReadableStream === 'function'"))
StreamingSupported = (bool)streamingSupported.Call ();
}