fix: Share popover incorrectly displays draft as publicly shared when parent document is (#2982)

closes #2978
This commit is contained in:
Tom Moor
2022-01-22 18:04:05 -08:00
committed by GitHub
parent e4dbd67ae1
commit 80c6e57aa3
2 changed files with 6 additions and 3 deletions

View File

@@ -20,7 +20,8 @@ function ShareButton({ document }: Props) {
const share = shares.getByDocumentId(document.id);
const sharedParent = shares.getByDocumentParents(document.id);
const isPubliclyShared =
(share && share.published) || (sharedParent && sharedParent.published);
(share && share.published) ||
(sharedParent && sharedParent.published && !document.isDraft);
const popover = usePopoverState({
gutter: 0,