@cocreate/crdt 1.12.0 → 1.13.0
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/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/index.js +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [1.13.0](https://github.com/CoCreate-app/CoCreate-crdt/compare/v1.12.0...v1.13.0) (2022-07-25)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* crud.getObjectValueByPath to return value using name containing a dotNotation string ([fd8bebf](https://github.com/CoCreate-app/CoCreate-crdt/commit/fd8bebf17722396a71d55affb297ec2718fb46a8))
|
|
7
|
+
|
|
1
8
|
# [1.12.0](https://github.com/CoCreate-app/CoCreate-crdt/compare/v1.11.2...v1.12.0) (2022-07-03)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -19,6 +19,8 @@ function init(info){
|
|
|
19
19
|
|
|
20
20
|
async function getDoc(info) {
|
|
21
21
|
try {
|
|
22
|
+
if (['_id', 'organization_id'].includes(info.name))
|
|
23
|
+
return
|
|
22
24
|
let docName = generateDocName(info);
|
|
23
25
|
let typeName = info.name;
|
|
24
26
|
let doc = docs.get(docName);
|
|
@@ -104,7 +106,7 @@ async function checkDb(info, flag) {
|
|
|
104
106
|
if (checkedDb.get(`${collection}${document_id}${name}`)) return;
|
|
105
107
|
checkedDb.set(`${collection}${document_id}${name}`, true);
|
|
106
108
|
let response = await crud.readDocument({ collection, document_id, name });
|
|
107
|
-
let string = response.data
|
|
109
|
+
let string = crud.getObjectValueByPath(response.data, name);
|
|
108
110
|
if (string && flag != false) {
|
|
109
111
|
info.value = string;
|
|
110
112
|
info.start = 0;
|