mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-17 23:44:39 -05:00
Fixed empty subscription object for comped members
refs https://github.com/TryGhost/Team/issues/1428 Editing a comped member's name doesn't return the dummy subscription object in API response, causing unexpected crash in Portal when setting Plan label as it expect's a subscription for a paid member. This change gracefully handles the crash and instead shows empty information for plan label so member can continue using Portal as expected.
This commit is contained in:
parent
6b88631521
commit
d4407b9acd
1 changed files with 1 additions and 1 deletions
|
@ -197,7 +197,7 @@ const PaidAccountActions = () => {
|
|||
const {
|
||||
offer,
|
||||
start_date: startDate
|
||||
} = subscription;
|
||||
} = subscription || {};
|
||||
let label = '';
|
||||
if (price) {
|
||||
const {amount = 0, currency, interval} = price;
|
||||
|
|
Loading…
Add table
Reference in a new issue