mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-11 00:37:55 +03:00
Fixed creating members without products
refs https://github.com/TryGhost/Team/issues/790 We were missing a check for the existence of memberData.products before attempting to read the length property from it, which can result in an Uncaught TypeError
This commit is contained in:
parent
7545e67f2c
commit
12a3ae77cf
@ -88,7 +88,7 @@ module.exports = class MemberRepository {
|
||||
status: 'free'
|
||||
};
|
||||
|
||||
if (memberData.products.length === 1) {
|
||||
if (memberData.products && memberData.products.length === 1) {
|
||||
memberStatusData.status = 'comped';
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user