mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-03-16 10:10:52 +00:00
fix spawn_local
This commit is contained in:
parent
12893183b6
commit
4e611c318e
@ -113,6 +113,7 @@ use std::sync::Arc;
|
||||
|
||||
use futures::executor::{self, Notify, Spawn};
|
||||
use futures::prelude::*;
|
||||
use futures::future;
|
||||
use futures::sync::oneshot;
|
||||
use js_sys::{Function, Promise};
|
||||
use wasm_bindgen::prelude::*;
|
||||
@ -393,6 +394,6 @@ where
|
||||
future_to_promise(
|
||||
future
|
||||
.map(|()| JsValue::undefined())
|
||||
.map_err(|()| JsValue::undefined()),
|
||||
.or_else(|()| future::ok::<JsValue, JsValue>(JsValue::undefined())),
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user