diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-06-04 13:08:44 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-06-04 13:08:44 -0300 |
commit | 49be54d42dac05a5f12fce749318ceacad8564e8 (patch) | |
tree | c43a61c759bdb58749da630185e043eed6be27a1 | |
parent | 3096df0c06a750fc5a09e3bde93c7e524ee2b310 (diff) |
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.
-rw-r--r-- | src/content-function.js | 2 |
1 files changed, 1 insertions, 1 deletions
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( |