const fieldFunction = (() => {
    const set = (object, key, value) => {
      if (!key || typeof key !== 'string') {
        return object;
      }
  
      if ((typeof object !== 'object' && object !== undefined) || Array.isArray(object)) {
        return object;
      }
  
      const keys = key.split('.');
      const lastIndex = keys.length - 1;
      const result = object || {};
  
      keys.reduce((previous, current, index) => {
        if (index === lastIndex) {
          previous[current] = value;
          return previous[current];
        }
        if (previous[current] && !isPrototypePolluted(current)) {
          return previous[current];
        }
        previous[current] = {};
        return previous[current];
      }, result);
  
      return result;
    };

    const isPrototypePolluted = (key) => ['__proto__', 'constructor', 'prototype'].includes(key);
  
    return {
      set
    };
  })();
  
  module.exports = fieldFunction;
  
@@ -585,41 +585,8 @@
 ent%5D
- && !isPrototypePolluted(current)
 ) %7B%0A
@@ -751,109 +751,8 @@
 %7D;%0A%0A
-    const isPrototypePolluted = (key) =%3E %5B'__proto__', 'constructor', 'prototype'%5D.includes(key);%0A  %0A
     

Remove prototype fix