Socket
Socket
Sign inDemoInstall

react-hook-form

Package Overview
Dependencies
Maintainers
1
Versions
1030
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-hook-form - npm Package Compare versions

Comparing version 0.1.8 to 0.1.9

7

dist/index.es.js

@@ -236,8 +236,11 @@ import { useRef, useState, useEffect } from 'react';

let radioOptionIndex;
const { ref, required, ref: { name, type, value }, } = data;
const { ref, required, validate, ref: { name, type, value }, } = data;
const allFields = fields.current;
if (isRadioInput(type)) {
if (!allFields[name]) {
allFields[name] = { options: [], required, ref: { type: 'radio', name } };
allFields[name] = { options: [], required, validate, ref: { type: 'radio', name } };
}
if (!allFields[name].validate && validate) {
allFields[name].validate = validate;
}
const options = allFields[name].options || [];

@@ -244,0 +247,0 @@ radioOptionIndex = options.findIndex(({ ref }) => value === ref.value);

@@ -238,8 +238,11 @@ 'use strict';

let radioOptionIndex;
const { ref, required, ref: { name, type, value }, } = data;
const { ref, required, validate, ref: { name, type, value }, } = data;
const allFields = fields.current;
if (isRadioInput(type)) {
if (!allFields[name]) {
allFields[name] = { options: [], required, ref: { type: 'radio', name } };
allFields[name] = { options: [], required, validate, ref: { type: 'radio', name } };
}
if (!allFields[name].validate && validate) {
allFields[name].validate = validate;
}
const options = allFields[name].options || [];

@@ -246,0 +249,0 @@ radioOptionIndex = options.findIndex(({ ref }) => value === ref.value);

{
"name": "react-hook-form",
"version": "0.1.8",
"version": "0.1.9",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "module": "dist/index.es.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc