« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/data/things/validators.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/data/things/validators.js b/src/data/things/validators.js
index 75358833..ef6b7b88 100644
--- a/src/data/things/validators.js
+++ b/src/data/things/validators.js
@@ -789,8 +789,9 @@ export function oneOf(...validators) {
       errors.push(error);
     }
 
+    const total = offset + leftoverValidators.length;
     throw new AggregateError(errors,
-      `Expected one of ${validators.length} possible checks, ` +
+      `Expected one of ${total} possible checks, ` +
       `but none were true`);
   };
 }