From 6728ad4203d731e555dabf89ec6157f113454ce6 Mon Sep 17 00:00:00 2001 From: Kenta Moriuchi Date: Mon, 1 May 2023 22:30:02 +0900 Subject: 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 --- ext/fetch/23_request.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'ext/fetch/23_request.js') 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 { -- cgit v1.2.3