Skip to content

Commit

Permalink
fix: legacy way to check isLoaded
Browse files Browse the repository at this point in the history
  • Loading branch information
Teages committed Aug 2, 2023
1 parent 44cc3ef commit ee66c74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/script-manager/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export function checkRecaptchaLoad() {
return false
}

const isLoaded = Object.hasOwn(window, 'grecaptcha') && Object.hasOwn(window.grecaptcha, 'execute')
const isLoaded = window.grecaptcha && window.grecaptcha.execute instanceof Function
if (isLoaded) {
recaptchaLoaded.resolve()
}
Expand Down

0 comments on commit ee66c74

Please sign in to comment.