fix: Enable documents.update with collab editing (#3647)

* fix: Enable documents.update with collab editing

* jest cannot deal with ESM deps
This commit is contained in:
Tom Moor
2022-06-20 16:36:25 +03:00
committed by GitHub
parent e0d2b6cace
commit 4b27feff61
4 changed files with 35 additions and 4 deletions

View File

@@ -60,10 +60,12 @@ export default async function documentUpdater({
if (fullWidth !== undefined) {
document.fullWidth = fullWidth;
}
if (!user.team?.collaborativeEditing) {
if (append) {
if (text !== undefined) {
if (user.team?.collaborativeEditing) {
document.updateFromMarkdown(text, append);
} else if (append) {
document.text += text;
} else if (text !== undefined) {
} else {
document.text = text;
}
}