forms-angular 0.12.0-beta.337 → 0.12.0-beta.339

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.
@@ -1855,7 +1855,9 @@ export class FormsAngular {
1855
1855
  if (record) {
1856
1856
  record._replacingHiddenFields = true;
1857
1857
  _.each(data, function (value, name) {
1858
- if (_.isObject(value) && !Array.isArray(value)) {
1858
+ // Only recurse into plain (sub-document) objects - Dates, ObjectIds etc are leaf values that
1859
+ // must be restored as-is, otherwise a secure Date field is silently dropped on every PUT
1860
+ if (_.isPlainObject(value)) {
1859
1861
  self.replaceHiddenFields(record[name], value);
1860
1862
  }
1861
1863
  else if (!record[name]) {
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  },
7
7
  "description": "A form builder that sits on top of Angular.js, Twitter Bootstrap, jQuery UI, Angular-UI, Express and Mongoose. Opinionated or what?",
8
8
  "homepage": "http://forms-angular.org",
9
- "version": "0.12.0-beta.337",
9
+ "version": "0.12.0-beta.339",
10
10
  "packageManager": "npm@10.2.4",
11
11
  "type": "module",
12
12
  "engines": {