diff --git a/lib/revision-selector/index.tsx b/lib/revision-selector/index.tsx index bc727f1a3..3e3df8b9e 100644 --- a/lib/revision-selector/index.tsx +++ b/lib/revision-selector/index.tsx @@ -36,7 +36,6 @@ export class RevisionSelector extends Component { onAcceptRevision = () => { const { noteId, openedRevision, restoreRevision } = this.props; - restoreRevision(noteId, openedRevision); }; @@ -66,7 +65,9 @@ export class RevisionSelector extends Component { revisions && openedRevision ? [...revisions.keys()].indexOf(openedRevision) : -1; - const isNewest = openedRevision && selectedIndex === revisions?.size - 1; + const isNewest = + !openedRevision || + (openedRevision && selectedIndex === revisions?.size - 1); const revisionDate = format( (openedRevision @@ -75,10 +76,6 @@ export class RevisionSelector extends Component { 'MMM d, yyyy h:mm a' ); - const revisionButtonStyle: CSSProperties = isNewest - ? { opacity: '0.5', pointerEvents: 'none' } - : {}; - const mainClasses = classNames('revision-selector', { 'is-visible': isViewingRevisions, }); @@ -105,7 +102,7 @@ export class RevisionSelector extends Component { Cancel