remix-validated-form 5.1.6 → 5.1.7

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/index.esm.js CHANGED
@@ -120,6 +120,8 @@ function _setPathNormalized(object, path, value) {
120
120
  }
121
121
  obj = obj[segment];
122
122
  }
123
+ if (typeof lastSegment === "string" && REJECT_KEYS.includes(lastSegment))
124
+ throw new Error(`Attempted to set a forbidden key: ${lastSegment}`);
123
125
  obj[lastSegment] = value;
124
126
  return object;
125
127
  }