diff --git a/ghost/post-revisions/lib/post-revisions.js b/ghost/post-revisions/lib/post-revisions.js index ebfbbab94f..1fdc61de59 100644 --- a/ghost/post-revisions/lib/post-revisions.js +++ b/ghost/post-revisions/lib/post-revisions.js @@ -80,7 +80,9 @@ class PostRevisions { ]; } - return [currentRevision, ...revisions].slice(0, this.config.max_revisions); + // Grab the most recent revisions, limited by max_revisions + const updatedRevisions = [...revisions, currentRevision]; + return updatedRevisions.slice(updatedRevisions.length - this.config.max_revisions, updatedRevisions.length); } /**