fix: erroneous non-reactive access warning in undelegated events (#900)

This commit is contained in:
Greg Johnston 2023-04-19 20:09:05 -04:00 committed by GitHub
parent b452d8af40
commit 6b825fec37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -86,13 +86,13 @@ pub(crate) fn add_event_listener_undelegated<E>(
{
cfg_if::cfg_if! {
if #[cfg(debug_assertions)] {
leptos_reactive::SpecialNonReactiveZone::enter();
let span = ::tracing::Span::current();
let cb = Box::new(move |e| {
leptos_reactive::SpecialNonReactiveZone::enter();
let _guard = span.enter();
cb(e);
leptos_reactive::SpecialNonReactiveZone::exit();
});
leptos_reactive::SpecialNonReactiveZone::exit();
}
}