From 97d62ac87cd8e8788cb6b04c62160aab623026c0 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sat, 30 Dec 2023 09:52:52 -0400 Subject: validators: fix validateAllPropertyValues messaging --- src/data/things/validators.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/data/things') diff --git a/src/data/things/validators.js b/src/data/things/validators.js index d881aac2..7289b6d7 100644 --- a/src/data/things/validators.js +++ b/src/data/things/validators.js @@ -402,7 +402,9 @@ export function validateAllPropertyValues(validator) { try { validator(value); } catch (error) { - error.message = `(key: ${colors.green(key)}, value: ${inspect(value)}) ${error.message}`; + const keyPart = colors.green(key.toString()); + const valuePart = inspect(value); + error.message = `(key: ${keyPart}, value: ${valuePart}) ${error.message}`; throw error; } }); -- cgit 1.3.0-6-gf8a5