diff options
Diffstat (limited to 'src/data')
-rw-r--r-- | src/data/things/validators.js | 4 |
1 files changed, 3 insertions, 1 deletions
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; } }); |