Skip to content
This repository was archived by the owner on Jan 14, 2021. It is now read-only.

Commit 3258ef8

Browse files
committed
close #25 on react-select clear
1 parent bb282ef commit 3258ef8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-hook-form-input",
3-
"version": "1.1.5",
3+
"version": "1.1.6-beta.1",
44
"description": "Wrapper component for controlled inputs",
55
"main": "dist/index.js",
66
"module": "dist/index.es.js",

src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Props, EventFunction } from './types';
44

55
function getValue(target: any, { isCheckbox }: { isCheckbox: boolean }) {
66
// the following logic is specific for react-select
7-
if (Array.isArray(target) || (target.label && target.value)) {
7+
if (target && (Array.isArray(target) || (target.label && target.value))) {
88
return target;
99
}
1010
return target ? (isCheckbox ? target.checked : target.value) : target;

0 commit comments

Comments
 (0)