Skip to content

Commit

Permalink
fix(gmap-vue): clear interval when callback was successfully called
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoazh committed Feb 18, 2022
1 parent 4d7b7c9 commit 302c6e1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/gmap-vue/src/utils/factories/promise-lazy.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ function createCallbackAndChecksIfMapIsLoaded(resolveFn, customCallback) {

if (window?.google?.maps != null && !callbackExecuted) {
window.GoogleMapsCallback();
callbackExecuted = true;
}

if (callbackExecuted) {
clearInterval(intervalId);
intervalId = undefined;
}
Expand Down

0 comments on commit 302c6e1

Please sign in to comment.