@internetstiftelsen/styleguide 2.25.0 → 2.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -141,9 +141,9 @@ var Form = function () {
|
|
|
141
141
|
};
|
|
142
142
|
|
|
143
143
|
this.captchaCallback = function () {
|
|
144
|
-
if (typeof window.grecaptcha !== 'undefined' &&
|
|
144
|
+
if (typeof window.grecaptcha !== 'undefined' && process.env.RECAPTCHA_KEY !== undefined) {
|
|
145
145
|
/* global grecaptcha */
|
|
146
|
-
grecaptcha.execute(process.env.
|
|
146
|
+
grecaptcha.execute(process.env.RECAPTCHA_KEY, { action: _this.recaptcha }).then(function (token) {
|
|
147
147
|
_this.token = token;
|
|
148
148
|
});
|
|
149
149
|
}
|
package/package.json
CHANGED
|
@@ -282,9 +282,9 @@ export default class Form {
|
|
|
282
282
|
};
|
|
283
283
|
|
|
284
284
|
captchaCallback = () => {
|
|
285
|
-
if (typeof window.grecaptcha !== 'undefined' &&
|
|
285
|
+
if (typeof window.grecaptcha !== 'undefined' && process.env.RECAPTCHA_KEY !== undefined) {
|
|
286
286
|
/* global grecaptcha */
|
|
287
|
-
grecaptcha.execute(process.env.
|
|
287
|
+
grecaptcha.execute(process.env.RECAPTCHA_KEY, { action: this.recaptcha })
|
|
288
288
|
.then((token) => {
|
|
289
289
|
this.token = token;
|
|
290
290
|
});
|