Skip to content

Commit

Permalink
Check for undefined faro instance
Browse files Browse the repository at this point in the history
  • Loading branch information
edkimmel authored Dec 5, 2024
1 parent c648cdb commit 8c7b83f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/web-sdk/src/utils/webStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ export function isWebStorageAvailable(type: StorageMechanism): boolean {
return true;
} catch (error) {
// the above can throw
faro.internalLogger?.info(`Web storage of type ${type} is not available. Reason: ${error}`);
// this is called during module init, when the global instance may not be available
faro?.internalLogger?.info(`Web storage of type ${type} is not available. Reason: ${error}`);
return false;
}
}
Expand Down

0 comments on commit 8c7b83f

Please sign in to comment.