We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 971f873 commit 725663fCopy full SHA for 725663f
crates/net/src/http/request.rs
@@ -337,13 +337,15 @@ impl Request {
337
let maybe_fetch =
338
js_sys::Reflect::get(&global, &JsValue::from_str("fetch")).unwrap();
339
if maybe_fetch.is_undefined() {
340
- panic!("no global fetch()")
+ panic!("no supported fetch api")
341
}
342
- let fetch = maybe_fetch.dyn_into::<js_sys::Function>().unwrap();
343
- let promise = fetch
+ maybe_fetch
+ .dyn_into::<js_sys::Function>()
344
+ .unwrap()
345
.call1(&global, &unsafe { JsValue::from_abi(request.return_abi()) })
- .map_err(js_to_error)?;
346
- promise.dyn_into::<js_sys::Promise>().unwrap()
+ .map_err(js_to_error)?
347
+ .dyn_into::<js_sys::Promise>()
348
349
350
};
351
0 commit comments