summaryrefslogtreecommitdiff
path: root/ext/fetch/23_request.js
diff options
context:
space:
mode:
authorKenta Moriuchi <moriken@kimamass.com>2023-05-01 22:30:02 +0900
committerGitHub <noreply@github.com>2023-05-01 15:30:02 +0200
commit6728ad4203d731e555dabf89ec6157f113454ce6 (patch)
tree956dc2d403b5a6ef107c35cab1ccc259ad4d86a1 /ext/fetch/23_request.js
parent94a148cdb6f7660518c75a3c20109bf64848f0f1 (diff)
fix(core): Use primordials for methods (#18839)
I would like to get this change into Deno before merging https://github.com/denoland/deno_lint/pull/1152
Diffstat (limited to 'ext/fetch/23_request.js')
-rw-r--r--ext/fetch/23_request.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/fetch/23_request.js b/ext/fetch/23_request.js
index d3132dc62..4c46ebe75 100644
--- a/ext/fetch/23_request.js
+++ b/ext/fetch/23_request.js
@@ -37,6 +37,7 @@ const {
ObjectKeys,
ObjectPrototypeIsPrototypeOf,
RegExpPrototypeTest,
+ StringPrototypeStartsWith,
Symbol,
SymbolFor,
TypeError,
@@ -90,7 +91,11 @@ function processUrlList(urlList, urlListProcessed) {
*/
function newInnerRequest(method, url, headerList, body, maybeBlob) {
let blobUrlEntry = null;
- if (maybeBlob && typeof url === "string" && url.startsWith("blob:")) {
+ if (
+ maybeBlob &&
+ typeof url === "string" &&
+ StringPrototypeStartsWith(url, "blob:")
+ ) {
blobUrlEntry = blobFromObjectUrl(url);
}
return {