Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Autocomplete undefined #5

Open
Ochieng424 opened this issue Apr 16, 2020 · 1 comment
Open

Autocomplete undefined #5

Ochieng424 opened this issue Apr 16, 2020 · 1 comment

Comments

@Ochieng424
Copy link

vue-google-places.esm.js?7479:174 Uncaught (in promise) TypeError: Cannot read property 'Autocomplete' of undefined
at VueComponent.setupGoogle (vue-google-places.esm.js?7479:174)
at eval (vue-google-places.esm.js?7479:86)

How can i solve this?

@mongonauta
Copy link

Hi @yariksav,

I have the same problem than @Ochieng424.

After some research, I think I found the solution. When we load the module, there is an IF to use gmapApiPromiseLazy that is not working. I just changed the code to use the else part

loadModulePromise = loadModulePromise || loadModule({ key: this.apiKey, v: this.version });

and all worked perfectly.

If you give me access, I can do a PR with the change.

Thank you so much!
Jose

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants