diff --git a/core/server/data/migrations/versions/4.14/02-fix-free-members-status-events.js b/core/server/data/migrations/versions/4.14/02-fix-free-members-status-events.js index 68c4e4e62a..ddecc128f5 100644 --- a/core/server/data/migrations/versions/4.14/02-fix-free-members-status-events.js +++ b/core/server/data/migrations/versions/4.14/02-fix-free-members-status-events.js @@ -30,7 +30,7 @@ module.exports = createTransactionalMigration( const events = eventsByMember[memberId]; events.sort((a, b) => { - return new Date(b) - new Date(a); + return new Date(b.created_at) - new Date(a.created_at); }); const mostRecentStatusEvent = events[0];