From 1fac3873841488cf519c83bd469983e81a3e818a Mon Sep 17 00:00:00 2001 From: Ibrahim Hadeed Date: Tue, 8 Mar 2016 13:41:34 -0500 Subject: [PATCH] fix(geolocation): set callback order to reverse on getCurrentPosition https://github.com/driftyco/ionic-native/issues/34 --- src/plugins/geolocation.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/geolocation.ts b/src/plugins/geolocation.ts index 6e5ebc99..524a9f5f 100644 --- a/src/plugins/geolocation.ts +++ b/src/plugins/geolocation.ts @@ -125,7 +125,9 @@ export class Geolocation { * @param {GeolocationOptions} options The [geolocation options](https://developer.mozilla.org/en-US/docs/Web/API/PositionOptions). * @return Returns a Promise that resolves with the [position](https://developer.mozilla.org/en-US/docs/Web/API/Position) of the device, or rejects with an error. */ - @Cordova() + @Cordova({ + callbackOrder: 'reverse' + }) static getCurrentPosition(options?: GeolocationOptions){ // This Promise is replaced by one from the @Cordova decorator that wraps // the plugin's callbacks. We provide a dummy one here so TypeScript