diff --git a/crates/eframe/src/web/events.rs b/crates/eframe/src/web/events.rs index 987b0cde7a30..797d098c43aa 100644 --- a/crates/eframe/src/web/events.rs +++ b/crates/eframe/src/web/events.rs @@ -358,7 +358,7 @@ fn install_color_scheme_change_event( runner_ref: &WebRunner, window: &web_sys::Window, ) -> Result<(), JsValue> { - if let Some(media_query_list) = prefers_color_scheme_dark(&window)? { + if let Some(media_query_list) = prefers_color_scheme_dark(window)? { runner_ref.add_event_listener::( &media_query_list, "change",