src/helpers/set-field.js
function cloneById (v, k) {
    if (Array.isArray(v)) {
      let match = find(v, it => String(it[options.idField]) === String(k));
      return match? cloneDeep(match) : (options.keepOrig? k : null);
    } else {
      return String(v[options.idField]) === String(k)? cloneDeep(v) : (options.keepOrig? k : null);
    }
  }
function cloneById (v, k) {
    if (Array.isArray(v)) {
      let match = find(v, it => String(it[options.idField]) === String(k));
      return match? cloneDeep(match) : (options.keepOrig? k : null);
    } else {
      return String(v[options.idField]) === String(k)? cloneDeep(v) : (options.keepOrig? k : null);
    }
  }
function cloneById ( v , k ) { if ( Array . isArray ( v ) ) { let match = find ( v , it => String ( it [ options . idField ] ) === String ( k ) ) ; return match ? cloneDeep ( match ) : ( options . keepOrig ? k : null ) ; } else { return String ( v [ options . idField ] ) === String ( k ) ? cloneDeep ( v ) : ( options . keepOrig ? k : null ) ; } }
avoid duplicate setField
avoid duplicate setField