0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Fixed members-csv not using renamed tiers field

This commit is contained in:
Simon Backx 2022-05-19 18:09:38 +02:00
parent f6d9b965db
commit 70229e4fd3

View file

@ -35,11 +35,11 @@ const unparse = (members, columns = DEFAULT_COLUMNS.slice()) => {
}).join(',');
}
let products = '';
let tiers = '';
if (Array.isArray(member.products)) {
products = member.products.map((product) => {
return product.name;
if (Array.isArray(member.tiers)) {
tiers = member.tiers.map((tier) => {
return tier.name;
}).join(',');
}
@ -54,7 +54,7 @@ const unparse = (members, columns = DEFAULT_COLUMNS.slice()) => {
created_at: member.created_at,
deleted_at: member.deleted_at,
labels: labels,
products: products,
products: tiers,
error: member.error || null
};
});