@cocreate/elements 1.15.0 → 1.15.1

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 CHANGED
@@ -1,3 +1,10 @@
1
+ ## [1.15.1](https://github.com/CoCreate-app/CoCreate-elements/compare/v1.15.0...v1.15.1) (2023-01-10)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * compare doument_id with element before seting value ([426b2d7](https://github.com/CoCreate-app/CoCreate-elements/commit/426b2d719eb9e0f012f05608ea1f70da463651f6))
7
+
1
8
  # [1.15.0](https://github.com/CoCreate-app/CoCreate-elements/compare/v1.14.8...v1.15.0) (2023-01-10)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/elements",
3
- "version": "1.15.0",
3
+ "version": "1.15.1",
4
4
  "description": "Fetch content into any html element by using html5 attributes to query data stored in CoCreate headless CMS. If data is changed it will instantly reflect in html tags as changes are broadcasted in realtime",
5
5
  "keywords": [
6
6
  "elements",
@@ -63,7 +63,7 @@
63
63
  "@cocreate/actions": "^1.5.52",
64
64
  "@cocreate/crud-client": "^1.17.15",
65
65
  "@cocreate/docs": "^1.5.6",
66
- "@cocreate/element-prototype": "^1.4.0",
66
+ "@cocreate/element-prototype": "^1.4.2",
67
67
  "@cocreate/observer": "^1.5.56",
68
68
  "@cocreate/utils": "^1.17.19"
69
69
  }
package/src/index.js CHANGED
@@ -129,7 +129,7 @@ function setData(elements, data) {
129
129
  if (el.hasAttribute('actions')) continue;
130
130
  if (isRead == "false" || isUpdate == "false" || isCrdt == "true") continue;
131
131
 
132
- if (data.document[0]['collection'] == collection) {
132
+ if (data.document[0]['collection'] == collection && data.document[0]['_id'] == document_id) {
133
133
  let value;
134
134
  let valueType = el.getAttribute('value-type');
135
135
  if (valueType == 'object' || valueType == 'json'){