mirror of
https://github.com/denoland/deno.git
synced 2024-10-29 08:58:01 -04:00
fix: stream strategy size should be plain function
This commit is contained in:
parent
14104c4e5b
commit
7ef0f43d87
1 changed files with 4 additions and 6 deletions
|
@ -3018,9 +3018,8 @@
|
|||
if (byteSizeFunctionWeakMap.has(globalObject)) {
|
||||
return;
|
||||
}
|
||||
byteSizeFunctionWeakMap.set(globalObject, function size(chunk) {
|
||||
return chunk.byteLength;
|
||||
});
|
||||
const size = (chunk) => chunk.byteLength;
|
||||
byteSizeFunctionWeakMap.set(globalObject, size);
|
||||
}
|
||||
|
||||
class CountQueuingStrategy {
|
||||
|
@ -3071,9 +3070,8 @@
|
|||
if (countSizeFunctionWeakMap.has(globalObject)) {
|
||||
return;
|
||||
}
|
||||
countSizeFunctionWeakMap.set(globalObject, function size() {
|
||||
return 1;
|
||||
});
|
||||
const size = () => 1;
|
||||
countSizeFunctionWeakMap.set(globalObject, size);
|
||||
}
|
||||
|
||||
/** @template R */
|
||||
|
|
Loading…
Reference in a new issue