@optionfactory/ful 1.0.10 → 1.0.12

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/ful.iife.js CHANGED
@@ -1149,7 +1149,7 @@ var ful = (function (exports, ftl) {
1149
1149
  static flatten(obj, prefix, stops) {
1150
1150
  return Object.keys(obj).reduce((acc, k) => {
1151
1151
  const pre = prefix.length ? prefix + '.' + k : k;
1152
- if (!stops.has(prefix) && typeof obj[k] === 'object' && obj[k] !== null) {
1152
+ if (!stops.has(pre) && typeof obj[k] === 'object' && obj[k] !== null) {
1153
1153
  Object.assign(acc, Bindings.flatten(obj[k], pre, stops));
1154
1154
  } else {
1155
1155
  acc[pre] = obj[k];
@@ -1247,7 +1247,7 @@ var ful = (function (exports, ftl) {
1247
1247
  }
1248
1248
 
1249
1249
  static mutateIn(form, values){
1250
- const names = Array.from(form.form.elements)
1250
+ const names = Array.from(form.elements)
1251
1251
  .map(el => el.getAttribute("name"))
1252
1252
  .filter(n => n);
1253
1253
  for (const [flattenedKey, value] of Object.entries(Bindings.flatten(values, '', new Set(names)))) {