mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-12 23:57:09 +00:00
fix: MaybeProp None case
This commit is contained in:
parent
8b9bcffbb9
commit
746bf8e453
1 changed files with 8 additions and 2 deletions
|
@ -561,7 +561,10 @@ pub mod read {
|
|||
&self,
|
||||
fun: impl FnOnce(&Self::Value) -> U,
|
||||
) -> Option<U> {
|
||||
self.0.as_ref().and_then(|n| n.try_with_untracked(fun))
|
||||
match &self.0 {
|
||||
None => Some(fun(&None)),
|
||||
Some(inner) => inner.try_with_untracked(fun),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -572,7 +575,10 @@ pub mod read {
|
|||
&self,
|
||||
fun: impl FnOnce(&Self::Value) -> U,
|
||||
) -> Option<U> {
|
||||
self.0.as_ref().and_then(|n| n.try_with(fun))
|
||||
match &self.0 {
|
||||
None => Some(fun(&None)),
|
||||
Some(inner) => inner.try_with(fun),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue