Fix: some fixes to studio

This commit is contained in:
Pieter Vander Vennet 2024-10-10 23:28:05 +02:00
parent 368d7857a0
commit c795e74037
2 changed files with 7 additions and 2 deletions

View file

@ -596,7 +596,12 @@ class DetectInline extends DesugaringStep<QuestionableTagRenderingConfigJson> {
return json
}
if(!Object.values(json.render).some(render => render !== "{"+json.freeform.key+"}")){
if(json.render === undefined){
context.err("No 'render' defined")
return json
}
if(!Object.values(json?.render)?.some(render => render !== "{"+json.freeform.key+"}")){
// We only render the current value, without anything more. Not worth inlining
return json
}

View file

@ -56,7 +56,7 @@
currentValue.ping()
if (isTagRenderingBlock) {
state.highlightedItem.setData({ path: [...path, currentValue.data.length - 1], schema })
state.highlightedItem?.setData({ path: [...path, currentValue.data.length - 1], schema })
}
}