Skip to content

Commit 1250e56

Browse files
committed
Replace instanceof Array with Array.isArray
1 parent 1b0ad8f commit 1250e56

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/DateInput.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function getValue(value, index) {
4242
return null;
4343
}
4444

45-
const rawValue = value instanceof Array && value.length === 2 ? value[index] : value;
45+
const rawValue = Array.isArray(value) && value.length === 2 ? value[index] : value;
4646

4747
if (!rawValue) {
4848
return null;
@@ -79,7 +79,7 @@ const getDetailValueTo = (args) => getDetailValue(args, 1);
7979
const getDetailValueArray = (args) => {
8080
const { value } = args;
8181

82-
if (value instanceof Array) {
82+
if (Array.isArray(value)) {
8383
return value;
8484
}
8585

0 commit comments

Comments
 (0)