Skip to content

Commit

Permalink
fix: guard against nonexistent published doc
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoerge committed Feb 24, 2025
1 parent 5dd9f23 commit 323e602
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export function getReferenceInfo(

const publishedDocumentExists$ = documentPreviewStore
.observePaths({_id: publishedId}, ['_rev'])
.pipe(map((res: any) => Boolean(res._rev)))
.pipe(map((res) => Boolean((res as {_id: string; _rev: string} | undefined)?._rev)))

const previewState$ = getPreviewStateObservable(
documentPreviewStore,
Expand Down

0 comments on commit 323e602

Please sign in to comment.