Skip to content

Commit

Permalink
Change sitekey getter to something that works
Browse files Browse the repository at this point in the history
Object `DynamicConfig` doesn't seem to be defined, at least when the first recaptcha is loaded.
  • Loading branch information
thostetler committed Nov 15, 2023
1 parent 194dec9 commit 55e6b75
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion src/js/widgets/authentication/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ define([
var pubsub = beehive.getService('PubSub');
_.bindAll(this, ['handleUserAnnouncement']);
pubsub.subscribe(pubsub.USER_ANNOUNCEMENT, this.handleUserAnnouncement);
siteKey = beehive.getObject('DynamicConfig').getRecaptchaKey();
siteKey = beehive.getObject('AppStorage').getConfigCopy().recaptchaKey;
},

navigateToLoginForm: function() {
Expand Down
2 changes: 1 addition & 1 deletion src/js/widgets/navbar/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ define([
.request(request);
};

const siteKey = this.getBeeHive().getObject('DynamicConfig').getRecaptchaKey();
const siteKey = this.getBeeHive().getObject('AppStorage').getConfigCopy().recaptchaKey;
window.grecaptcha.ready(() => {
window.grecaptcha
.execute(siteKey, { action: 'feedback/general' })
Expand Down

0 comments on commit 55e6b75

Please sign in to comment.