diff options
-rw-r--r-- | src/data/validators.js | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/data/validators.js b/src/data/validators.js index 2d90987f..1ac8c336 100644 --- a/src/data/validators.js +++ b/src/data/validators.js @@ -129,9 +129,7 @@ export function isObject(value) { } export function isArray(value) { - isObject(value); - - if (!Array.isArray(value)) + if (typeof value !== 'object' || value === null || !Array.isArray(value)) throw new TypeError(`Expected an array, got ${value}`); return true; |