From 1b161d8c9e8155bb88983ea9a82f4063386a6d0b Mon Sep 17 00:00:00 2001 From: Ibrahim Hadeed Date: Sun, 17 Jul 2016 23:01:03 -0400 Subject: [PATCH] fix(geolocation): handle errors on watchPosition closes #322 --- src/plugins/geolocation.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/geolocation.ts b/src/plugins/geolocation.ts index 60d28a7e3..06ffd8d87 100644 --- a/src/plugins/geolocation.ts +++ b/src/plugins/geolocation.ts @@ -154,7 +154,7 @@ export class Geolocation { static watchPosition(options?: GeolocationOptions): Observable { return new Observable( (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); } );