Skip to content

Commit

Permalink
Fixed members-csv not using renamed tiers field
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonBackx committed May 19, 2022
1 parent f6d9b96 commit 70229e4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ghost/members-csv/lib/unparse.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(',');
}

Expand All @@ -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
};
});
Expand Down

0 comments on commit 70229e4

Please sign in to comment.