summaryrefslogtreecommitdiff
path: root/cli/rt/11_streams.js
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2020-09-17 10:11:55 -0400
committerGitHub <noreply@github.com>2020-09-17 16:11:55 +0200
commit46bf660e361c854c7a139b488a4630a2eb1cab28 (patch)
tree90eecfec72221a2c9c385ebba2cc3a3c4cacf008 /cli/rt/11_streams.js
parent1e6d37f88c80ab3cb2d6fe43206feb61135ff574 (diff)
refactor: make fetch use op_fetch_read instead of op_read (#7529)
Diffstat (limited to 'cli/rt/11_streams.js')
-rw-r--r--cli/rt/11_streams.js10
1 files changed, 1 insertions, 9 deletions
diff --git a/cli/rt/11_streams.js b/cli/rt/11_streams.js
index e5a5732e5..7f8af19e2 100644
--- a/cli/rt/11_streams.js
+++ b/cli/rt/11_streams.js
@@ -388,7 +388,7 @@
let { highWaterMark } = strategy;
const { type } = underlyingSource;
- if (isUnderlyingByteSource(underlyingSource)) {
+ if (underlyingSource.type == "bytes") {
if (size !== undefined) {
throw new RangeError(
`When underlying source is "bytes", strategy.size must be undefined.`,
@@ -1226,14 +1226,6 @@
);
}
- function isUnderlyingByteSource(
- underlyingSource,
- ) {
- const { type } = underlyingSource;
- const typeString = String(type);
- return typeString === "bytes";
- }
-
function isWritableStream(x) {
return !(
typeof x !== "object" ||