JSON to client (#5553)
This commit is contained in:
@@ -2,6 +2,7 @@ import { observer } from "mobx-react";
|
||||
import * as React from "react";
|
||||
import { useLocation, RouteComponentProps, StaticContext } from "react-router";
|
||||
import { NavigationNode, TeamPreference } from "@shared/types";
|
||||
import { ProsemirrorHelper } from "@shared/utils/ProsemirrorHelper";
|
||||
import { RevisionHelper } from "@shared/utils/RevisionHelper";
|
||||
import Document from "~/models/Document";
|
||||
import Revision from "~/models/Revision";
|
||||
@@ -92,7 +93,7 @@ function DataLoader({ match, children }: Props) {
|
||||
}
|
||||
}
|
||||
void fetchDocument();
|
||||
}, [ui, documents, document, shareId, documentSlug]);
|
||||
}, [ui, documents, shareId, documentSlug]);
|
||||
|
||||
React.useEffect(() => {
|
||||
async function fetchRevision() {
|
||||
@@ -161,7 +162,7 @@ function DataLoader({ match, children }: Props) {
|
||||
collectionId: document.collectionId,
|
||||
parentDocumentId: nested ? document.id : document.parentDocumentId,
|
||||
title,
|
||||
text: "",
|
||||
data: ProsemirrorHelper.getEmptyDocument(),
|
||||
});
|
||||
|
||||
return newDocument.url;
|
||||
|
||||
Reference in New Issue
Block a user