fix outlet depth override
This commit is contained in:
1 file changed
+1
-2
@@ -90,8 +90,7 @@ pub fn Outlet(cx: Scope<OutletProps>) -> Element {
|
||||
let depth = cx.use_hook(|| {
|
||||
let mut context = cx.consume_context::<OutletData>().unwrap_or_default();
|
||||
let depth = depth
|
||||
.or_else(|| context.depth(name))
|
||||
.map(|d| d + 1)
|
||||
.or_else(|| context.depth(name).map(|d| d + 1))
|
||||
.unwrap_or_default();
|
||||
context.set_depth(name, depth);
|
||||
cx.provide_context(context);
|
||||
|
||||
Reference in new issue
Block a user