@webtypen/webframez-core 0.2.67 → 0.2.68
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 @@ class DataBuilder {
|
|
|
201
201
|
newData.forms = yield type.forms(req);
|
|
202
202
|
}
|
|
203
203
|
for (let form in type.forms) {
|
|
204
|
-
if (!type.forms[form] || !type.forms[form].fields
|
|
204
|
+
if (!type.forms[form] || !type.forms[form].fields) {
|
|
205
205
|
continue;
|
|
206
206
|
}
|
|
207
207
|
newData.forms[form] = {};
|
|
@@ -220,6 +220,9 @@ class DataBuilder {
|
|
|
220
220
|
else if (type.forms[form].fields) {
|
|
221
221
|
newData.forms[form].fields = JSON.parse(JSON.stringify(type.forms[form].fields));
|
|
222
222
|
}
|
|
223
|
+
if (!newData.forms[form].fields || newData.forms[form].fields.length < 1) {
|
|
224
|
+
continue;
|
|
225
|
+
}
|
|
223
226
|
newData.forms[form].allowDeletion =
|
|
224
227
|
(typeof type.forms[form].allowDeletion === "boolean" && type.forms[form].allowDeletion) ||
|
|
225
228
|
(typeof type.forms[form].allowDeletion === "function" && (yield type.forms[form].allowDeletion(req)))
|
package/package.json
CHANGED
|
@@ -254,7 +254,7 @@ export class DataBuilder {
|
|
|
254
254
|
}
|
|
255
255
|
|
|
256
256
|
for (let form in type.forms) {
|
|
257
|
-
if (!type.forms[form] || !type.forms[form].fields
|
|
257
|
+
if (!type.forms[form] || !type.forms[form].fields) {
|
|
258
258
|
continue;
|
|
259
259
|
}
|
|
260
260
|
|
|
@@ -275,6 +275,10 @@ export class DataBuilder {
|
|
|
275
275
|
newData.forms[form].fields = JSON.parse(JSON.stringify(type.forms[form].fields));
|
|
276
276
|
}
|
|
277
277
|
|
|
278
|
+
if (!newData.forms[form].fields || newData.forms[form].fields.length < 1) {
|
|
279
|
+
continue;
|
|
280
|
+
}
|
|
281
|
+
|
|
278
282
|
newData.forms[form].allowDeletion =
|
|
279
283
|
(typeof type.forms[form].allowDeletion === "boolean" && type.forms[form].allowDeletion) ||
|
|
280
284
|
(typeof type.forms[form].allowDeletion === "function" && (await type.forms[form].allowDeletion(req)))
|