cloud-web-corejs 1.0.54-dev.572 → 1.0.54-dev.574
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.
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
if (!data) return data;
|
|
14
14
|
var nMap = {};
|
|
15
15
|
for (const key in data) {
|
|
16
|
-
const value = data[key];
|
|
16
|
+
const value = data[key] ?? null;
|
|
17
17
|
const nKey = commonDataUtil.toHump(key);
|
|
18
18
|
nMap[nKey] = value;
|
|
19
19
|
}
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
let keys = Object.keys(formData);
|
|
33
33
|
for (let i = 0; i < keys.length; i++) {
|
|
34
34
|
let key = keys[i];
|
|
35
|
-
let value = formData[key];
|
|
35
|
+
let value = formData[key] ?? null;
|
|
36
36
|
if (ignore_fields.includes(key) || key.indexOf(ignore_key) == 0) {
|
|
37
37
|
delete formData[key];
|
|
38
38
|
continue;
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
formData[key] = toDo(value);
|
|
56
56
|
} else {
|
|
57
57
|
if (key == 'id' && value.toString().indexOf('row_') == 0) {
|
|
58
|
-
formData[key] =
|
|
58
|
+
formData[key] = null;
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
}
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
var tKey = field ? field + '.' : '';
|
|
70
70
|
for (const key in data) {
|
|
71
71
|
const rKey = tKey + commonDataUtil.toHump(key);
|
|
72
|
-
let value = data[key];
|
|
72
|
+
let value = data[key] ?? null;
|
|
73
73
|
if (value != null) {
|
|
74
74
|
if (Array.isArray(value)) {
|
|
75
75
|
value.forEach(function(item, index) {
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
Object.assign(formData, commonDataUtil.handleForm2(value, rKey));
|
|
81
81
|
} else {
|
|
82
82
|
if (key == 'id' && value.toString().indexOf('row_') == 0) {
|
|
83
|
-
value =
|
|
83
|
+
value = null;
|
|
84
84
|
} else {
|
|
85
85
|
formData[rKey] = value;
|
|
86
86
|
}
|