mirror of
https://github.com/leptos-rs/leptos.git
synced 2025-12-27 09:54:41 -05:00
This commit is contained in:
@@ -286,7 +286,9 @@ macro_rules! spawn_derived {
|
||||
|
||||
let mut first_run = {
|
||||
let (ready_tx, ready_rx) = oneshot::channel();
|
||||
AsyncTransition::register(ready_rx);
|
||||
if !was_ready {
|
||||
AsyncTransition::register(ready_rx);
|
||||
}
|
||||
Some(ready_tx)
|
||||
};
|
||||
|
||||
@@ -342,7 +344,9 @@ macro_rules! spawn_derived {
|
||||
// register with global transition listener, if any
|
||||
let ready_tx = first_run.take().unwrap_or_else(|| {
|
||||
let (ready_tx, ready_rx) = oneshot::channel();
|
||||
AsyncTransition::register(ready_rx);
|
||||
if !was_ready {
|
||||
AsyncTransition::register(ready_rx);
|
||||
}
|
||||
ready_tx
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user