@formio/js 5.1.0-dev.5979.2bccb41 → 5.1.0-dev.5979.933c0c9

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.
@@ -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, _d;
197
+ var _a, _b, _c;
198
198
  if (!Formio_1.Formio.libraries[this.getLibraryName()]) {
199
199
  return;
200
200
  }
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 : [];
201
+ const existingScript = document === null || document === void 0 ? void 0 : document.querySelector(`script[src^="${GOOGLE_MAPS_JS_URL}"]`);
202
+ if (existingScript && ((_a = options.params) === null || _a === void 0 ? void 0 : _a.key) && !existingScript.attributes.src.value.endsWith(options.params.key)) {
203
+ const googleMapsScripts = (_b = document.querySelectorAll(`script[src^="${GOOGLE_MAPS_BASE_URL}"]`)) !== null && _b !== void 0 ? _b : [];
204
204
  googleMapsScripts.forEach(script => script.parentNode.removeChild(script));
205
205
  delete Formio_1.Formio.libraries[this.getLibraryName()];
206
- (_d = global === null || global === void 0 ? void 0 : global.google) === null || _d === void 0 ? true : delete _d.maps;
206
+ (_c = global === null || global === void 0 ? void 0 : global.google) === null || _c === void 0 ? true : delete _c.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?.querySelector?.(`script[src^="${GOOGLE_MAPS_JS_URL}"]`);
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));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/js",
3
- "version": "5.1.0-dev.5979.2bccb41",
3
+ "version": "5.1.0-dev.5979.933c0c9",
4
4
  "description": "JavaScript powered Forms with JSON Form Builder",
5
5
  "main": "lib/cjs/index.js",
6
6
  "exports": {