0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

🐛 Fixed recommendations popup not opening

closes https://linear.app/ghost/issue/ONC-254
closes #20771

The portal script, which is responsible for handling the recommendations popup,
was only loaded into the front end if either members or donations are enabled.
We're adding an extra condition to load it if recommendations are enabled.

We may want to consider splitting out this functionality into several scripts,
so that we don't have to load _everything_ if only one feature is enabled, but
that is outside the scope of this issue.
This commit is contained in:
Cathy Sarisky 2024-10-23 03:49:10 -04:00 committed by GitHub
parent 8615bd538b
commit de3b9b1ec5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -45,8 +45,8 @@ function finaliseStructuredData(meta) {
}
function getMembersHelper(data, frontendKey) {
// Do not load Portal if both Memberships and Tips & Donations are disabled
if (!settingsCache.get('members_enabled') && !settingsCache.get('donations_enabled')) {
// Do not load Portal if both Memberships and Tips & Donations and Recommendations are disabled
if (!settingsCache.get('members_enabled') && !settingsCache.get('donations_enabled') && !settingsCache.get('recommendations_enabled')) {
return '';
}