Skip to content

Commit

Permalink
FIO-9607 GoogleAddressProvider: Check for browser API in tryRemoveLib…
Browse files Browse the repository at this point in the history
…rary

  - To my best understanding,  we had a failing test in the OS formio API because:
  - If an address component with a Google provider was rendered via the API, it resulted in an error
  • Loading branch information
blakekrammes committed Jan 14, 2025
1 parent 7cbee3b commit 96c77b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/providers/address/GoogleAddressProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ export class GoogleAddressProvider extends AddressProvider {
* @param {ProviderOptions} options - The options for the provider.
*/
tryRemoveLibrary(options = {}) {
if (!Formio.libraries[this.getLibraryName()]) {
if (!Formio.libraries[this.getLibraryName()] || !document?.querySelector) {
return;
}

Expand Down

0 comments on commit 96c77b0

Please sign in to comment.