@optimiser/common 1.0.376 → 1.0.377
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/lib/utility.js +5 -1
- package/package.json +1 -1
package/dist/lib/utility.js
CHANGED
|
@@ -4810,8 +4810,12 @@ function ValidateUserInput(options) {
|
|
|
4810
4810
|
return [4 /*yield*/, db.collection(objectName).findOne({ '_id': documentID })];
|
|
4811
4811
|
case 2:
|
|
4812
4812
|
parentData = _k.sent();
|
|
4813
|
-
oldValue = parentData[fieldName];
|
|
4813
|
+
oldValue = parentData[fieldName] || null;
|
|
4814
4814
|
newValue = fieldData;
|
|
4815
|
+
// Check if newValue is undefined
|
|
4816
|
+
if (newValue === undefined) {
|
|
4817
|
+
return [2 /*return*/, "break"];
|
|
4818
|
+
}
|
|
4815
4819
|
isSame = false;
|
|
4816
4820
|
if (field.UIDataType == 'multiselect' || field.UIDataType == 'multilookup') {
|
|
4817
4821
|
isSame = IsEqualArrays(oldValue, newValue);
|