Google map not loading property unless I press ctrl+f5. I initialise map inside vue js mounted hook. The error displayed is
Error in mounted hook: "ReferenceError: google is not defined"
when I press ctrl+f5 everything works fine
<div id="map"></div>
<script src="https://maps.googleapis.com/maps/api/js?key=****"
async defer></script>
new Vue({
el:'#app',
mounted() {
map = new google.maps.Map(document.getElementById('map'), {
center: {lat: -34.397, lng: 150.644},
zoom: 8
});
}
});