Skip to content

Commit 6eafe16

Browse files
authoredMar 3, 2025··
fix(structure): preload should use published id (#8796)
1 parent 6859ed5 commit 6eafe16

File tree

1 file changed

+2
-1
lines changed
  • packages/sanity/src/structure/components/paneItem

1 file changed

+2
-1
lines changed
 

Diff for: ‎packages/sanity/src/structure/components/paneItem/PaneItem.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import {
1919
import {
2020
type FIXME,
2121
type GeneralPreviewLayoutKey,
22+
getPublishedId,
2223
PreviewCard,
2324
SanityDefaultPreview,
2425
useDocumentPresence,
@@ -181,7 +182,7 @@ export function PaneItem(props: PaneItemProps) {
181182
function PreloadDocumentPane(props: {documentId: string; documentType: string}) {
182183
const {documentId, documentType} = props
183184
// Preload the edit state for the document, and keep it alive until mouse leave
184-
useEditState(documentId, documentType)
185+
useEditState(getPublishedId(documentId), documentType)
185186

186187
return null
187188
}

0 commit comments

Comments
 (0)
Please sign in to comment.