From 49be54d42dac05a5f12fce749318ceacad8564e8 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sun, 4 Jun 2023 13:08:44 -0300 Subject: infra: hint error when bad object constructor This isn't really proper error handling or validation, but it'll make this error a little less annoying to deal with meanwhile. --- src/content-function.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/content-function.js b/src/content-function.js index 3536d5a8..73e4629e 100644 --- a/src/content-function.js +++ b/src/content-function.js @@ -325,7 +325,7 @@ export function fillRelationsLayoutFromSlotResults(relationIdentifier, results, } if (object.constructor !== Object) { - throw new Error(`Expected primitive, array, relation, or normal {key: value} style Object`); + throw new Error(`Expected primitive, array, relation, or normal {key: value} style Object, got constructor ${object.constructor?.name}`); } return Object.fromEntries( -- cgit 1.3.0-6-gf8a5