mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-04-01 02:41:39 -05:00
🐛 Fixed offer page showing empty name for logged in member
closes https://github.com/TryGhost/Team/issues/1301 - if a logged in member doesn't a name stored, the offer page for them gets bricked while trying to redeem as the UI doesn't allow submit. - removes name field for logged-in member if empty
This commit is contained in:
parent
c66bdb86b6
commit
b0139dcc6d
1 changed files with 8 additions and 1 deletions
|
@ -245,7 +245,14 @@ export default class OfferPage extends React.Component {
|
|||
];
|
||||
|
||||
/** Show Name field if portal option is set*/
|
||||
if (portalName) {
|
||||
let showNameField = !!portalName;
|
||||
|
||||
/** Hide name field for logged in member if empty */
|
||||
if (!!member && !member?.name) {
|
||||
showNameField = false;
|
||||
}
|
||||
|
||||
if (showNameField) {
|
||||
fields.unshift({
|
||||
type: 'text',
|
||||
value: member?.name || state.name,
|
||||
|
|
Loading…
Add table
Reference in a new issue