fix spawn_local

This commit is contained in:
lcnr/Bastian Kauschke 2019-01-12 17:42:05 +01:00
parent 12893183b6
commit 4e611c318e

View File

@ -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())),
);
}