mirror of
https://github.com/adoyle0/leptos-use.git
synced 2025-01-22 16:49:22 -05:00
Minor change
This commit is contained in:
parent
e84cbe5e84
commit
b420cc742a
1 changed files with 1 additions and 2 deletions
|
@ -42,11 +42,10 @@ pub fn use_device_orientation() -> UseDeviceOrientationReturn {
|
|||
let gamma = || None;
|
||||
} else {
|
||||
use crate::{use_event_listener_with_options, UseEventListenerOptions};
|
||||
use js_sys::Reflect;
|
||||
use leptos::ev::deviceorientation;
|
||||
use wasm_bindgen::JsValue;
|
||||
|
||||
let is_supported = Signal::derive(|| Reflect::has(
|
||||
let is_supported = Signal::derive(|| js_sys::Reflect::has(
|
||||
&window(),
|
||||
&JsValue::from_str("DeviceOrientationEvent"),
|
||||
).unwrap_or(false));
|
||||
|
|
Loading…
Add table
Reference in a new issue