);
}
render() {
const { t, pageHistoryContainer } = this.props;
const revisions = this.props.revisions;
const revisionCount = this.props.revisions.length;
let hasDiffPrev;
const revisionList = this.props.revisions.map((revision, idx) => {
// Returns null because the last revision is for the bottom diff display
if (idx === pageHistoryContainer.state.pagingLimit) {
return null;
}
let previousRevision;
if (idx + 1 < revisionCount) {
previousRevision = revisions[idx + 1];
}
else {
previousRevision = revision; // if it is the first revision, show full text as diff text
}
const hasDiff = revision.hasDiffToPrev !== false; // set 'true' if undefined for backward compatibility
const isContiguousNodiff = !hasDiff && !hasDiffPrev;
hasDiffPrev = hasDiff;
return this.renderRow(revision, previousRevision, hasDiff, isContiguousNodiff);
});
return (