Skip to content

Commit

Permalink
fix(desk): remove restore action when revision is latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
hermanwikner committed Jan 2, 2023
1 parent d714540 commit 2846eec
Showing 1 changed file with 5 additions and 0 deletions.
Expand Up @@ -34,6 +34,11 @@ export const HistoryRestoreAction: DocumentActionComponent = ({id, type, revisio
}, [handleConfirm, isConfirmDialogOpen, onComplete])

const isRevisionInitialVersion = revision === '@initial'
const isRevisionLatestVersion = revision === undefined // undefined means latest version

if (isRevisionLatestVersion) {
return null
}

return {
label: 'Restore',
Expand Down

1 comment on commit 2846eec

@vercel
Copy link

@vercel vercel bot commented on 2846eec Jan 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

test-studio – ./

test-studio-git-next.sanity.build
test-studio.sanity.build

Please sign in to comment.