Skip to content

Commit

Permalink
Add safewindow guard
Browse files Browse the repository at this point in the history
  • Loading branch information
arhtudormorar committed Dec 3, 2024
1 parent e1c5f70 commit 45f1541
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/providers/helpers/getConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ import {
} from '../types/providerFactory.types';

export const getConfig = async (config: IProviderConfig = {}) => {
if (!safeWindow.document) {
return config;
}

defineCustomElements(safeWindow);
const ledgerModalElement = document.createElement(
'ledger-connect-modal'
Expand Down

0 comments on commit 45f1541

Please sign in to comment.