Skip to content

Commit ffca88b

Browse files
committed
fix(server) Fixes a problem where records with hidden fields are sent back with _id after a save.
1 parent 19a698d commit ffca88b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/data_form.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ DataForm.prototype.saveAndRespond = function (req, res, hiddenFields) {
740740
} else {
741741
doc2 = doc2.toObject();
742742
for (var hiddenField in hiddenFields) {
743-
if (hiddenFields.hasOwnProperty(hiddenField)) {
743+
if (hiddenFields.hasOwnProperty(hiddenField) && hiddenFields[hiddenField]) {
744744
if (doc2.hasOwnProperty(hiddenField)) {
745745
delete doc2[hiddenField];
746746
}

0 commit comments

Comments
 (0)