@live-change/prosemirror-service 0.8.32 → 0.8.34
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/index.js +4 -4
- package/model.js +1 -1
- package/package.json +4 -4
package/index.js
CHANGED
|
@@ -248,7 +248,7 @@ definition.action({
|
|
|
248
248
|
const openDocument = await getDocument(document, type)
|
|
249
249
|
if(!openDocument) throw new Error('document not found')
|
|
250
250
|
console.log("EDIT DOCUMENT", openDocument.version, 'WITH', version)
|
|
251
|
-
if(openDocument.version
|
|
251
|
+
if(openDocument.version !== version) {
|
|
252
252
|
console.error("WRONG VERSION", openDocument.version, '!=', version)
|
|
253
253
|
return 'rejected'
|
|
254
254
|
}
|
|
@@ -258,9 +258,9 @@ definition.action({
|
|
|
258
258
|
//console.log("DOC DATA", documentData)
|
|
259
259
|
//console.log("CONTINUATION", documentData.lastStepsBucket, sessionOrUserType, sessionOrUser)
|
|
260
260
|
if(!openDocument.lastStepsBucket
|
|
261
|
-
|| openDocument.lastStepsBucket.sessionOrUserType
|
|
262
|
-
|| openDocument.lastStepsBucket.sessionOrUser
|
|
263
|
-
|| openDocument.lastStepsBucket.window
|
|
261
|
+
|| openDocument.lastStepsBucket.sessionOrUserType !== sessionOrUserType
|
|
262
|
+
|| openDocument.lastStepsBucket.sessionOrUser !== sessionOrUser
|
|
263
|
+
|| openDocument.lastStepsBucket.window !== window) {
|
|
264
264
|
console.log("CONTINUATION IGNORED!!")
|
|
265
265
|
return 'rejected' // ignore, client will rebase
|
|
266
266
|
}
|
package/model.js
CHANGED
|
@@ -114,7 +114,7 @@ async function getDocument(documentId, documentType) {
|
|
|
114
114
|
}
|
|
115
115
|
openDocuments.set(documentId, document)
|
|
116
116
|
}
|
|
117
|
-
if(document.type
|
|
117
|
+
if(document.type !== documentType) throw new Error("wrong document type!")
|
|
118
118
|
return document
|
|
119
119
|
}
|
|
120
120
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/prosemirror-service",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.34",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
},
|
|
23
23
|
"type": "module",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@live-change/framework": "^0.8.
|
|
26
|
-
"@live-change/relations-plugin": "^0.8.
|
|
25
|
+
"@live-change/framework": "^0.8.34",
|
|
26
|
+
"@live-change/relations-plugin": "^0.8.34",
|
|
27
27
|
"lru-cache": "^7.12.0",
|
|
28
28
|
"pluralize": "^8.0.0",
|
|
29
29
|
"progress-stream": "^2.0.0",
|
|
30
30
|
"prosemirror-model": "^1.18.1"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "40e61928bf43b35352c76fc135f36a2d8bd76c4a"
|
|
33
33
|
}
|