@formio/js 5.1.0-dev.5977.69f20ee → 5.1.0-dev.5979.2bccb41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/formio.form.js +1 -1
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +1 -1
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.js +1 -1
- package/dist/formio.min.js +1 -1
- package/lib/cjs/providers/address/GoogleAddressProvider.js +5 -5
- package/lib/mjs/providers/address/GoogleAddressProvider.js +1 -1
- package/package.json +1 -1
@@ -194,16 +194,16 @@ class GoogleAddressProvider extends AddressProvider_1.AddressProvider {
|
|
194
194
|
* @param {ProviderOptions} options - The options for the provider.
|
195
195
|
*/
|
196
196
|
tryRemoveLibrary(options = {}) {
|
197
|
-
var _a, _b, _c;
|
197
|
+
var _a, _b, _c, _d;
|
198
198
|
if (!Formio_1.Formio.libraries[this.getLibraryName()]) {
|
199
199
|
return;
|
200
200
|
}
|
201
|
-
const existingScript = document.querySelector(`script[src^="${GOOGLE_MAPS_JS_URL}"]`);
|
202
|
-
if (existingScript && ((
|
203
|
-
const googleMapsScripts = (
|
201
|
+
const existingScript = (_a = document === null || document === void 0 ? void 0 : document.querySelector) === null || _a === void 0 ? void 0 : _a.call(document, `script[src^="${GOOGLE_MAPS_JS_URL}"]`);
|
202
|
+
if (existingScript && ((_b = options.params) === null || _b === void 0 ? void 0 : _b.key) && !existingScript.attributes.src.value.endsWith(options.params.key)) {
|
203
|
+
const googleMapsScripts = (_c = document.querySelectorAll(`script[src^="${GOOGLE_MAPS_BASE_URL}"]`)) !== null && _c !== void 0 ? _c : [];
|
204
204
|
googleMapsScripts.forEach(script => script.parentNode.removeChild(script));
|
205
205
|
delete Formio_1.Formio.libraries[this.getLibraryName()];
|
206
|
-
(
|
206
|
+
(_d = global === null || global === void 0 ? void 0 : global.google) === null || _d === void 0 ? true : delete _d.maps;
|
207
207
|
delete global[`${this.getLibraryName()}Callback`];
|
208
208
|
}
|
209
209
|
}
|
@@ -190,7 +190,7 @@ export class GoogleAddressProvider extends AddressProvider {
|
|
190
190
|
if (!Formio.libraries[this.getLibraryName()]) {
|
191
191
|
return;
|
192
192
|
}
|
193
|
-
const existingScript = document
|
193
|
+
const existingScript = document?.querySelector?.(`script[src^="${GOOGLE_MAPS_JS_URL}"]`);
|
194
194
|
if (existingScript && options.params?.key && !existingScript.attributes.src.value.endsWith(options.params.key)) {
|
195
195
|
const googleMapsScripts = document.querySelectorAll(`script[src^="${GOOGLE_MAPS_BASE_URL}"]`) ?? [];
|
196
196
|
googleMapsScripts.forEach(script => script.parentNode.removeChild(script));
|