Urbansson
05/03/2023, 11:40 AMjs
TypeError: url.clone is not a function
and that makes sense as you do the following
js
typeof url === "string" ? url : (url as Request).clone()
the URL
object does not have the clone methed defined.
We currently solve it be calling toString before passing it to fetch, but breaking the fetch api might make other thirdparty dependencies break.
You can try it yourself by doing something like this:
js
fetch(new URL(("https://localhost:3000/index.html"))).then(() => {console.log("fetched")}).catch(err => console.log("err", err))
rp
05/03/2023, 2:49 PMUrbansson
05/03/2023, 2:54 PMporcellus
05/03/2023, 3:49 PM