Skip to content

Commit

Permalink
fix use_geolocation
Browse files Browse the repository at this point in the history
  • Loading branch information
marc2332 committed Feb 9, 2024
1 parent 1b35f9d commit 42adeb4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion std/src/geolocation/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,11 @@ impl Geolocator {

/// Subscribe a mpsc channel to the events.
pub fn listen(&self, listener: Coroutine<Event>) -> Result<(), Error> {
let tx = listener.tx();
platform::listen(
&self.device_geolocator,
Arc::new(move |event: Event| {
listener.send(event);
tx.unbounded_send(event);
}),
)
}
Expand Down

0 comments on commit 42adeb4

Please sign in to comment.