@openframe-org/criteria-set-protocol 2.6.4 → 2.6.5

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.
Files changed (2) hide show
  1. package/dist/v1/utils.js +3 -0
  2. package/package.json +1 -1
package/dist/v1/utils.js CHANGED
@@ -101,6 +101,9 @@ exports.getCertificationsByValue = getCertificationsByValue;
101
101
  * In all cases, the data should contain 'text' and 'readOnly' properties
102
102
  */
103
103
  const validateData = (dataOrTreeElement) => {
104
+ if ("type" in dataOrTreeElement && dataOrTreeElement.type === "task-group") {
105
+ throw new Error("Task groups cannot have data");
106
+ }
104
107
  if (("type" in dataOrTreeElement) && dataOrTreeElement.type === "task-item" && !("readOnly" in dataOrTreeElement)) {
105
108
  throw new Error("Data is missing 'readOnly' property");
106
109
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openframe-org/criteria-set-protocol",
3
- "version": "2.6.4",
3
+ "version": "2.6.5",
4
4
  "description": "A protocol and tools for defining and working with criteria sets",
5
5
  "private": false,
6
6
  "author": "Andrés Angulo <aa@openframe.org>",