Skip to content

Commit

Permalink
fix danielsogl#3303 geolocation watchPosition return type
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidWiesner authored Jun 24, 2020
1 parent 9f27d54 commit 2d5f190
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/@ionic-native/plugins/geolocation/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ export class Geolocation extends IonicNativePlugin {
* @param {GeolocationOptions} options The [geolocation options](https://developer.mozilla.org/en-US/docs/Web/API/PositionOptions).
* @returns {Observable<Geoposition>} Returns an Observable that notifies with the [position](https://developer.mozilla.org/en-US/docs/Web/API/Position) of the device, or errors.
*/
watchPosition(options?: GeolocationOptions): Observable<Geoposition> {
return new Observable<Geoposition>((observer: any) => {
watchPosition(options?: GeolocationOptions): Observable<Geoposition | PositionError> {
return new Observable<Geoposition | PositionError>((observer: any) => {
const watchId = navigator.geolocation.watchPosition(
observer.next.bind(observer),
observer.next.bind(observer),
Expand Down

0 comments on commit 2d5f190

Please sign in to comment.