Skip to content

LocationManager.init callback sometimes returns undefined in the first call #42

Description

@tsdmrfth

Hence the title, we've had LocationManager initialization issue in our TMA.

LocationManager.init() call returns the below result

{
    "isInited": false,
    "isLocationAvailable": false,
    "isAccessRequested": false,
    "isAccessGranted": false
  }

and the LocationManger.init with callback returns undefined callback value.

LocationManager.init((isInitialized) => {
    // typeof isInitialized is undefined here
})

However I've noticed that the second call to LocationManager.init results with success so I've used the workaround below

if (!WebApp.LocationManager.isInited) {
    if (WebApp.LocationManager.init().isInited) {
        manageLocation()
    } else {
        setTimeout(() => {
            manageLocation()
        }, 50)
    }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions