fix release builds

This commit is contained in:
Evan Almloff committed 2023-08-21 14:28:45 -05:00
1 parent df85b25548
commit f09a2e2280
4 files changed
+24 -20

No files matched your search

+9 -3
View File
@@ -1,4 +1,3 @@
use std::panic::Location;
use std::rc::Rc;
use dioxus_core::prelude::{
@@ -85,11 +84,18 @@ impl<T: 'static> CopyValue<T> {
}
}
pub(crate) fn new_with_caller(value: T, caller: &'static Location<'static>) -> Self {
pub(crate) fn new_with_caller(
value: T,
#[cfg(debug_assertions)] caller: &'static std::panic::Location<'static>,
) -> Self {
let owner = current_owner();
Self {
value: owner.insert_with_caller(value, caller),
value: owner.insert_with_caller(
value,
#[cfg(debug_assertions)]
caller,
),
origin_scope: current_scope_id().expect("in a virtual dom"),
}
}