google-location-autocomplete-react
Advanced tools
Comparing version 1.0.18 to 1.0.19
@@ -39,5 +39,5 @@ var __assign = (this && this.__assign) || function () { | ||
}; | ||
var url = "https://maps.googleapis.com/maps/api/js?key=".concat(apiKey, "&libraries=places&callback=initAutocomplete"); | ||
var loadScript = function () { | ||
window.initAutocomplete = initAutocomplete; | ||
var url = "https://maps.googleapis.com/maps/api/js?key=".concat(apiKey, "&libraries=places&callback=initAutocomplete"); | ||
if (!document.querySelector("script[src=\"".concat(url, "\"]"))) { | ||
@@ -55,2 +55,6 @@ var script = document.createElement("script"); | ||
delete window.initAutocomplete; | ||
var script = document.querySelector("script[src=\"".concat(url, "\"]")); | ||
if (script) { | ||
script.remove(); | ||
} | ||
}; | ||
@@ -57,0 +61,0 @@ }, [apiKey]); |
{ | ||
"name": "google-location-autocomplete-react", | ||
"version": "1.0.18", | ||
"version": "1.0.19", | ||
"main": "dist/GoogleLocationAutocomplete.js", | ||
@@ -5,0 +5,0 @@ "types": "dist/GoogleLocationAutocomplete.d.ts", |
5546
76