@@ 134,8 134,8 @@ function buildResult (result, refs, defs) {
}
}
return {
+ ...existingResult,
[v.key]: keyResult,
- ...existingResult
}
})
})
@@ 175,6 175,9 @@ function buildResult (result, refs, defs) {
function handlePipe (data, pipe, definitions) {
if (pipe.type === REF) {
+ if (typeof pipe.value !== 'string') {
+ throw new Error(`Bad definition reference: ${JSON.stringify(pipe.value)}`)
+ }
const definition = definitions[pipe.value]
if (!definition) {
throw new Error(`Definition not found: ${pipe.value}`)