Skip to content

Commit

Permalink
fix spawn_local
Browse files Browse the repository at this point in the history
  • Loading branch information
lcnr committed Jan 12, 2019
1 parent 1289318 commit 4e611c3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/futures/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;
Expand Down Expand Up @@ -393,6 +394,6 @@ where
future_to_promise(
future
.map(|()| JsValue::undefined())
.map_err(|()| JsValue::undefined()),
.or_else(|()| future::ok::<JsValue, JsValue>(JsValue::undefined())),
);
}

0 comments on commit 4e611c3

Please sign in to comment.