diff --git a/src/app/browser/window/tab/item/page.rs b/src/app/browser/window/tab/item/page.rs index 8764ba38..44da88fa 100644 --- a/src/app/browser/window/tab/item/page.rs +++ b/src/app/browser/window/tab/item/page.rs @@ -186,16 +186,13 @@ impl Page { // Reset widgets self.input.unset(); - // Cancel previous async loading operations - { - let cancellable = self.cancellable.borrow(); - - if !cancellable.is_cancelled() { - cancellable.cancel(); - } + // Cancel previous async operations + let cancellable = self.cancellable.take(); + if !cancellable.is_cancelled() { + cancellable.cancel(); } - // Create new cancellable pointer + // Create new cancellable self.cancellable.replace(Cancellable::new()); // Create shared variant value