Skip to content

Commit

Permalink
fix(geolocation): handle errors on watchPosition
Browse files Browse the repository at this point in the history
closes #322
  • Loading branch information
ihadeed committed Jul 18, 2016
1 parent 074d166 commit 1b161d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugins/geolocation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export class Geolocation {
static watchPosition(options?: GeolocationOptions): Observable<Geoposition> {
return new Observable<Geoposition>(
(observer: any) => {
let watchId = navigator.geolocation.watchPosition(observer.next.bind(observer), options);
let watchId = navigator.geolocation.watchPosition(observer.next.bind(observer), observer.error.bind(observer), options);
return () => navigator.geolocation.clearWatch(watchId);
}
);
Expand Down

0 comments on commit 1b161d8

Please sign in to comment.