0
Fork 0
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:
Rishabh 2022-03-16 21:08:47 +05:30
parent 6b88631521
commit d4407b9acd

View file

@ -197,7 +197,7 @@ const PaidAccountActions = () => {
const {
offer,
start_date: startDate
} = subscription;
} = subscription || {};
let label = '';
if (price) {
const {amount = 0, currency, interval} = price;