« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data
diff options
context:
space:
mode:
Diffstat (limited to 'src/data')
-rw-r--r--src/data/validators.js4
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;