@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.
- package/dist/v1/utils.js +3 -0
- 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