front-end: minor refactoring

This commit is contained in:
Stephen Seo 2022-04-29 11:23:03 +09:00
parent e77d25996d
commit e6152331b0

View file

@ -607,7 +607,7 @@ impl Wrapper {
fn cleanup_disconnect_callbacks(&mut self) {
let window = web_sys::window().expect("Should be able to get window");
// if previously set disconnect callback is set, unset it
if let Some(callback) = self.cleanup_id_callback.borrow_mut().take() {
if let Some(callback) = self.cleanup_id_callback.take() {
let mut options = EventListenerOptions::new();
options.capture(true);
if window