0
Fork 0
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:
Rishabh 2022-02-02 13:04:57 +05:30
parent c66bdb86b6
commit b0139dcc6d

View file

@ -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,