mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-19 16:52:53 +08:00
Merge pull request #35 from ihadeed/fix-geolocation
fix(geolocation): set callback order to reverse on getCurrentPosition
This commit is contained in:
commit
a0fb95e286
@ -125,7 +125,9 @@ export class Geolocation {
|
|||||||
* @param {GeolocationOptions} options The [geolocation options](https://developer.mozilla.org/en-US/docs/Web/API/PositionOptions).
|
* @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.
|
* @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){
|
static getCurrentPosition(options?: GeolocationOptions){
|
||||||
// This Promise is replaced by one from the @Cordova decorator that wraps
|
// This Promise is replaced by one from the @Cordova decorator that wraps
|
||||||
// the plugin's callbacks. We provide a dummy one here so TypeScript
|
// the plugin's callbacks. We provide a dummy one here so TypeScript
|
||||||
|
Loading…
Reference in New Issue
Block a user