fix release build

This commit is contained in:
Adrian Wannenmacher committed 2022-12-09 01:42:30 +01:00
1 parent a170aa76e0
commit ef76453422
3 files changed
+9 -6

No files matched your search

+4 -3
View File
@@ -54,11 +54,12 @@ pub fn Link<'a>(cx: Scope<'a, LinkProps<'a>>) -> Element {
let router = match use_router_internal(&cx) {
Some(r) => r,
None => {
error!("`Link` must have access to a parent router, will be inactive");
let msg = "`Link` must have access to a parent router";
error!("{msg}, will be inactive");
#[cfg(debug_assertions)]
panic!("`Link` must have access to a parent router");
panic!("{}", msg);
#[cfg(not(debug_assertions))]
return None;
anyhow::bail!("{msg}");
}
};
let state = loop {
+4 -3
View File
@@ -18,11 +18,12 @@ pub fn Outlet(cx: Scope<OutletProps>) -> Element {
let router = match use_router_internal(&cx) {
Some(r) => r,
None => {
error!("`Outlet` must have access to a parent router, will be inactive");
let msg = "`Outlet` must have access to a parent router";
error!("{msg}, will be inactive");
#[cfg(debug_assertions)]
panic!("`Outlet` must have access to a parent router");
panic!("{}", msg);
#[cfg(not(debug_assertions))]
return None;
anyhow::bail!("{msg}");
}
};
let state = loop {