mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 19:33:02 +03: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 --> ### <samp>🤖 Generated by Copilot at 59d45a1</samp> Improved `memberLinks` function in `koenig-lexical-editor.js` to support optional links and fix a bug.
This commit is contained in:
parent
ea2defb76c
commit
d1e1dc3e79
@ -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…
Reference in New Issue
Block a user