Skip to content

Commit

Permalink
fix: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
faris-imi committed Feb 13, 2024
1 parent 5137a1f commit 9f16141
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ The hCaptcha Loader targetted for older browsers can also be imported via a CDN
<script type="text/javascript" src="https://unpkg.com/@hcaptcha/loader@latest/dist/index.es5.js"></script>
</head>
<body>
<div id="container"></div>
<script type="text/javascript">
hCaptchaLoader.then(function() {
var element = document.createElement('div');
hCaptchaLoader().then(function(hcaptcha) {
// hCaptcha API is ready
hcaptcha.render(element, {
hcaptcha.render('container', {
sitekey: 'YOUR_SITE_KEY',
// Additional options here
});
Expand Down
2 changes: 1 addition & 1 deletion lib/src/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export function hCaptchaApi(params: ILoaderParams = { cleanup: true }, sentry: S
export async function loadScript(params, retries = 0) {
const message = retries < MAX_RETRIES ? 'Retry loading hCaptcha Api' : 'Exceeded maximum retries';

const sentry = initSentry(params.sentry);
const sentry = initSentry(params && params.sentry);

try {

Expand Down

0 comments on commit 9f16141

Please sign in to comment.