Skip to content

Commit

Permalink
fix(structure): wait for timeline ready only if params.rev is provided
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoerge committed Oct 7, 2024
1 parent 13518b2 commit 05ee27e
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,9 @@ export const DocumentPaneProvider = memo((props: DocumentPaneProviderProps) => {
* a timeline revision in this instance will display an error localized to the popover itself.
*/
const ready =
connectionState === 'connected' && editState.ready && (timelineReady || !!timelineError)
connectionState === 'connected' &&
editState.ready &&
(!params.rev || timelineReady || !!timelineError)

const displayed: Partial<SanityDocument> | undefined = useMemo(
() => (onOlderRevision ? timelineDisplayed || {_id: value._id, _type: value._type} : value),
Expand Down

0 comments on commit 05ee27e

Please sign in to comment.