super-page-runtime 2.0.42 → 2.0.43

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.
@@ -201,7 +201,7 @@ function validateWorkflowFormDataModel(dataModel, pageContext) {
201
201
  let result = false;
202
202
  const handleModels = JSON.parse(JSON.stringify(dataModel));
203
203
  const rules = pageContext.rules;
204
- if (!rules) {
204
+ if (!rules || Object.keys(rules).length === 0) {
205
205
  result = true;
206
206
  } else {
207
207
  result = validator(handleModels, rules, null, null, true);
@@ -265,7 +265,7 @@ function validateWorkflowFormDataModel(dataModel, pageContext) {
265
265
  function validateCommonFormDataModel(dataModel, pageContext, rules) {
266
266
  return new Promise((resolve, reject) => {
267
267
  const handleModels = JSON.parse(JSON.stringify(dataModel));
268
- if (!rules && Object.keys(rules).length === 0) {
268
+ if (!rules || Object.keys(rules).length === 0) {
269
269
  resolve(handleModels);
270
270
  } else {
271
271
  const validateEntityResult = validator(handleModels, rules, null, null, true);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "super-page-runtime",
3
- "version": "2.0.42",
3
+ "version": "2.0.43",
4
4
  "description": "AgileBuilder super page runtime",
5
5
  "license": "ISC",
6
6
  "main": "dist/es/index.js",