diff --git a/CHANGELOG.md b/CHANGELOG.md index 0bf1185..c1c06a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -70,6 +70,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed auto-reconnect in `use_websocket` - Fixed typo in compiler error messages in `use_cookie` (thanks to @SleeplessOne1917). +- Fixed potential signal out of scope issue with `use_raf_fn` ## [0.10.10] - 2024-05-10 diff --git a/src/use_raf_fn.rs b/src/use_raf_fn.rs index a5010db..d390cd1 100644 --- a/src/use_raf_fn.rs +++ b/src/use_raf_fn.rs @@ -89,7 +89,7 @@ pub fn use_raf_fn_with_options( let previous_frame_timestamp = Cell::new(0.0_f64); move |timestamp: f64| { - if !is_active.get_untracked() { + if !is_active.try_get_untracked().unwrap_or_default() { return; }