mirror of
https://github.com/leptos-rs/leptos.git
synced 2025-12-27 09:54:41 -05:00
fix: wasm in spawn_local condition
This commit is contained in:
@@ -231,11 +231,11 @@ impl Executor {
|
||||
/// Uses `Executor::spawn`, respecting the global executor.
|
||||
pub async fn tick() {
|
||||
let (tx, rx) = futures::channel::oneshot::channel();
|
||||
#[cfg(not(feature = "wasm-bindgen"))]
|
||||
#[cfg(not(all(feature = "wasm-bindgen", target_family = "wasm")))]
|
||||
Executor::spawn(async move {
|
||||
_ = tx.send(());
|
||||
});
|
||||
#[cfg(feature = "wasm-bindgen")]
|
||||
#[cfg(all(feature = "wasm-bindgen", target_family = "wasm"))]
|
||||
Executor::spawn_local(async move {
|
||||
_ = tx.send(());
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user