mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-05-02 00:07:23 +08:00
Merge & fix confilcts
This commit is contained in:
@@ -155,8 +155,7 @@ export class Geolocation {
|
||||
static watchPosition(options?: GeolocationOptions): Observable<Geoposition> {
|
||||
return new Observable<Geoposition>(
|
||||
(observer: any) => {
|
||||
let cb = (data: Geoposition) => observer.next(data);
|
||||
let watchId = navigator.geolocation.watchPosition(cb, options);
|
||||
let watchId = navigator.geolocation.watchPosition(observer.next.bind(observer), options);
|
||||
return () => navigator.geolocation.clearWatch(watchId);
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user