mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-04-01 02:41:39 -05:00
🐛 Fixed memberlinks returning undefined in autocomplete. (#17385)
refs https://github.com/TryGhost/Ghost/pull/17327 - Added an additional condition to avoid the new memberLinks function from returning undefined, which may lead to nothing being returned at all in the autocomplete. --- <!-- Leave the line below if you'd like GitHub Copilot to generate a summary from your commit --> <!-- copilot:summary --> Improved `memberLinks` function in `koenig-lexical-editor.js` to support optional links and fix a bug.
This commit is contained in:
parent
fad31e0bca
commit
0c719f33f7
1 changed files with 4 additions and 1 deletions
|
@ -264,8 +264,9 @@ export default class KoenigLexicalEditor extends Component {
|
|||
});
|
||||
|
||||
const memberLinks = () => {
|
||||
let links = [];
|
||||
if (this.membersUtils.paidMembersEnabled) {
|
||||
return [
|
||||
links = [
|
||||
{
|
||||
label: 'Paid signup',
|
||||
value: this.config.getSiteUrl('/#/portal/signup')
|
||||
|
@ -275,6 +276,8 @@ export default class KoenigLexicalEditor extends Component {
|
|||
value: this.config.getSiteUrl('/#/portal/account/plans')
|
||||
}];
|
||||
}
|
||||
|
||||
return links;
|
||||
};
|
||||
return [...defaults, ...offersLinks, ...memberLinks()];
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue