@supernova-studio/client 0.47.65 → 0.47.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +21 -21
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/yjs/version-room/frontend.ts +4 -4
package/package.json
CHANGED
|
@@ -126,10 +126,6 @@ export class FrontendVersionRoomYDoc {
|
|
|
126
126
|
const result = new Map<string, DTODocumentationDraftState>();
|
|
127
127
|
|
|
128
128
|
pages.forEach(page => {
|
|
129
|
-
// Current state
|
|
130
|
-
const currentPageContentHash = pageHashes[page.persistentId] ?? "";
|
|
131
|
-
const currentState: ItemState = this.itemStateFromPage(page, currentPageContentHash);
|
|
132
|
-
|
|
133
129
|
// Published state
|
|
134
130
|
const snapshot = publishedSnapshotsByPageId.get(page.id);
|
|
135
131
|
let publishedState: ItemState | undefined;
|
|
@@ -138,6 +134,10 @@ export class FrontendVersionRoomYDoc {
|
|
|
138
134
|
publishedState = this.itemStateFromPage(publishedPage, snapshot.pageContentHash);
|
|
139
135
|
}
|
|
140
136
|
|
|
137
|
+
// Current state - if content hash is undefined, it means that the page hasn't changed
|
|
138
|
+
const currentPageContentHash = pageHashes[page.persistentId] ?? snapshot?.pageContentHash ?? "";
|
|
139
|
+
const currentState: ItemState = this.itemStateFromPage(page, currentPageContentHash);
|
|
140
|
+
|
|
141
141
|
// Calculate draft
|
|
142
142
|
const draftState = this.createDraftState(page.persistentId, currentState, publishedState);
|
|
143
143
|
if (draftState) result.set(page.id, draftState);
|