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

Commit e8bc097

Browse files
author
Ismael Ambrosi
committed
[release]
1 parent d28a214 commit e8bc097

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-recaptcha",
3-
"version": "4.1.4",
3+
"version": "4.1.5",
44
"keywords": ["angular", "captcha", "recaptcha", "vividcortex", "human", "form", "validation", "signup", "security", "login"],
55
"main": "release/angular-recaptcha.js",
66
"ignore": [

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-recaptcha",
3-
"version": "4.1.4",
3+
"version": "4.1.5",
44
"description": "An AngularJS module to ease usage of reCaptcha inside a form",
55
"author": "VividCortex",
66
"license": "MIT",

release/angular-recaptcha.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license angular-recaptcha build:2018-05-03
2+
* @license angular-recaptcha build:2018-05-09
33
* https://github.com/vividcortex/angular-recaptcha
44
* Copyright (c) 2018 VividCortex
55
**/
@@ -152,14 +152,18 @@
152152
}
153153
}
154154

155+
function isRenderFunctionAvailable() {
156+
return ng.isFunction(($window.grecaptcha || {}).render);
157+
}
158+
155159

156160
// Check if grecaptcha.render is not defined already.
157-
if (ng.isFunction(($window.grecaptcha || {}).render)) {
161+
if (isRenderFunctionAvailable()) {
158162
callback();
159163
} else if ($window.document.querySelector('script[src^="https://www.google.com/recaptcha/api.js"]')) {
160164
// wait for script to be loaded.
161165
var intervalWait = $interval(function() {
162-
if (ng.isDefined($window.grecaptcha)) {
166+
if (isRenderFunctionAvailable()) {
163167
$interval.cancel(intervalWait);
164168
callback();
165169
}

release/angular-recaptcha.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)