perf: Don't load CRDT state from database by default (#3215)

This commit is contained in:
Tom Moor
2022-03-09 20:07:10 -08:00
committed by GitHub
parent 5efeb90fdd
commit d399e1048a
6 changed files with 27 additions and 8 deletions

View File

@@ -20,7 +20,11 @@ export default class Persistence {
return;
}
const document = await Document.findByPk(documentId);
const document = await Document.scope("withState").findOne({
where: {
id: documentId,
},
});
invariant(document, "Document not found");
if (document.state) {