react-google-autocomplete
Advanced tools
Comparing version 2.7.2 to 2.7.3
@@ -30,9 +30,9 @@ "use strict"; | ||
var scriptUrl = new URL(googleMapsScriptUrl); | ||
scriptUrl.searchParams.set("callback", "__REACT_GOOGLE_AUTOCOMPLETE_CALLBACK__"); | ||
var el = document.createElement("script"); | ||
el.src = googleMapsScriptUrl; | ||
document.body.appendChild(el); | ||
el.src = scriptUrl.toString(); | ||
return new Promise(function (resolve) { | ||
el.addEventListener("load", function () { | ||
return resolve(); | ||
}); | ||
window.__REACT_GOOGLE_AUTOCOMPLETE_CALLBACK__ = resolve; | ||
document.body.appendChild(el); | ||
}); | ||
@@ -39,0 +39,0 @@ }; |
{ | ||
"name": "react-google-autocomplete", | ||
"version": "2.7.2", | ||
"version": "2.7.3", | ||
"description": "React component for google autocomplete.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -27,10 +27,14 @@ export const isBrowser = typeof window !== "undefined" && window.document; | ||
let scriptUrl = new URL(googleMapsScriptUrl); | ||
scriptUrl.searchParams.set( | ||
"callback", | ||
"__REACT_GOOGLE_AUTOCOMPLETE_CALLBACK__" | ||
); | ||
const el = document.createElement("script"); | ||
el.src = googleMapsScriptUrl; | ||
el.src = scriptUrl.toString(); | ||
document.body.appendChild(el); | ||
return new Promise((resolve) => { | ||
el.addEventListener("load", () => resolve()); | ||
window.__REACT_GOOGLE_AUTOCOMPLETE_CALLBACK__ = resolve; | ||
document.body.appendChild(el); | ||
}); | ||
}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
402914
1052