You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think i’ve found a bug with either Response or ReadableStream, can you check this out when you have a moment?
The following code doesn't work as expected. It should return the same string as the input, but instead it returns an empty string:
consttext="foo";// Create a ReadableStream from stringconststream1=newResponse(text).body;// Read from stream1 using Response.prototype.text();consttextFromStream1=awaitnewResponse(stream1).text();// textFromStream1 should be 'foo', but it's ''
Something to note is that if I instead use a reader like this, I get the right result (so I'm currently using this as a workaround):
consttext="foo";// Create a ReadableStream from stringconststream2=newResponse(text).body;// Use a reader to read from stream2conststream2Reader=stream2.getReader();lettextFromStream2='';constdecoder=newTextDecoder();while(true){const{ done, value }=awaitstream2Reader.read();if(done){break;}textFromStream2+=decoder.decode(value);}// textFromStream2 correctly contains 'foo'
Hi all,
I think i’ve found a bug with either Response or ReadableStream, can you check this out when you have a moment?
The following code doesn't work as expected. It should return the same string as the input, but instead it returns an empty string:
I've put a repro of this up in a fiddle https://fiddle.fastly.dev/fiddle/750711db
This happens for me on the newest version of js-compute-runtime: 3.8.2
The text was updated successfully, but these errors were encountered: