|
|
@@ -4453,8 +4453,11 @@ class PageService implements IPageService {
|
|
|
|
|
|
async getYjsData(pageId: string): Promise<CurrentPageYjsData> {
|
|
|
const yjsConnectionManager = getYjsConnectionManager();
|
|
|
+
|
|
|
const currentYdoc = yjsConnectionManager.getCurrentYdoc(pageId);
|
|
|
- const yjsDraft = currentYdoc?.getText('codemirror').toString();
|
|
|
+ const persistedYdoc = await yjsConnectionManager.getPersistedYdoc(pageId);
|
|
|
+
|
|
|
+ const yjsDraft = (currentYdoc ?? persistedYdoc)?.getText('codemirror').toString();
|
|
|
const hasRevisionBodyDiff = await this.hasRevisionBodyDiff(pageId, yjsDraft);
|
|
|
|
|
|
return {
|