« 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/things/composite.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/data/things/composite.js')
-rw-r--r--src/data/things/composite.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/data/things/composite.js b/src/data/things/composite.js
index 7a3a831..c03f883 100644
--- a/src/data/things/composite.js
+++ b/src/data/things/composite.js
@@ -4,6 +4,7 @@ import {colors} from '#cli';
 import {TupleMap} from '#wiki-data';
 
 import {
+  a,
   is,
   isString,
   isWholeNumber,
@@ -464,8 +465,8 @@ function validateInputValue(value, description) {
     } else {
       throw new TypeError(
         (type
-          ? `Expected ${type}, got ${typeAppearance(value)}`
-          : `Expected value, got ${typeAppearance(value)}`));
+          ? `Expected ${a(type)}, got ${typeAppearance(value)}`
+          : `Expected a value, got ${typeAppearance(value)}`));
     }
   }
 
@@ -478,7 +479,7 @@ function validateInputValue(value, description) {
         : typeof value);
 
     if (typeofValue !== type) {
-      throw new TypeError(`Expected ${type}, got ${typeAppearance(value)}`);
+      throw new TypeError(`Expected ${a(type)}, got ${typeAppearance(value)}`);
     }
   }
 
@@ -1997,6 +1998,7 @@ export const withPropertiesFromObject = templateCompositeFrom({
     object: input({type: 'object', acceptsNull: true}),
 
     properties: input({
+      type: 'array',
       validate: validateArrayItems(isString),
     }),