Skip to content
This repository has been archived by the owner on Aug 17, 2021. It is now read-only.

Commit

Permalink
[release]
Browse files Browse the repository at this point in the history
  • Loading branch information
Ismael Ambrosi committed May 9, 2018
1 parent d28a214 commit e8bc097
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-recaptcha",
"version": "4.1.4",
"version": "4.1.5",
"keywords": ["angular", "captcha", "recaptcha", "vividcortex", "human", "form", "validation", "signup", "security", "login"],
"main": "release/angular-recaptcha.js",
"ignore": [
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-recaptcha",
"version": "4.1.4",
"version": "4.1.5",
"description": "An AngularJS module to ease usage of reCaptcha inside a form",
"author": "VividCortex",
"license": "MIT",
Expand Down
10 changes: 7 additions & 3 deletions release/angular-recaptcha.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @license angular-recaptcha build:2018-05-03
* @license angular-recaptcha build:2018-05-09
* https://github.com/vividcortex/angular-recaptcha
* Copyright (c) 2018 VividCortex
**/
Expand Down Expand Up @@ -152,14 +152,18 @@
}
}

function isRenderFunctionAvailable() {
return ng.isFunction(($window.grecaptcha || {}).render);
}


// Check if grecaptcha.render is not defined already.
if (ng.isFunction(($window.grecaptcha || {}).render)) {
if (isRenderFunctionAvailable()) {
callback();
} else if ($window.document.querySelector('script[src^="https://www.google.com/recaptcha/api.js"]')) {
// wait for script to be loaded.
var intervalWait = $interval(function() {
if (ng.isDefined($window.grecaptcha)) {
if (isRenderFunctionAvailable()) {
$interval.cancel(intervalWait);
callback();
}
Expand Down
4 changes: 2 additions & 2 deletions release/angular-recaptcha.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e8bc097

Please sign in to comment.