Fixes #709 - Share links fail when logged into another Outline account
This commit is contained in:
parent
03411ead09
commit
28690be77c
@ -66,7 +66,7 @@ class Document extends BaseModel {
|
||||
});
|
||||
};
|
||||
|
||||
if (this.collection.documents) {
|
||||
if (this.collection && this.collection.documents) {
|
||||
traveler(this.collection.documents, []);
|
||||
if (path) return path;
|
||||
}
|
||||
|
@ -110,9 +110,10 @@ class DocumentScene extends React.Component<Props> {
|
||||
text: '',
|
||||
});
|
||||
} else {
|
||||
const { shareId } = props.match.params;
|
||||
this.document = await this.props.documents.fetch(
|
||||
props.match.params.documentSlug,
|
||||
{ shareId: props.match.params.shareId }
|
||||
{ shareId }
|
||||
);
|
||||
|
||||
const document = this.document;
|
||||
@ -123,7 +124,7 @@ class DocumentScene extends React.Component<Props> {
|
||||
// Cache data if user enters edit mode and cancels
|
||||
this.editCache = document.text;
|
||||
|
||||
if (this.props.auth.user) {
|
||||
if (this.props.auth.user && !shareId) {
|
||||
if (!this.isEditing && document.publishedAt) {
|
||||
this.viewTimeout = setTimeout(document.view, MARK_AS_VIEWED_AFTER);
|
||||
}
|
||||
|
Reference in New Issue
Block a user