guard against part types that have not been impl in the view
This commit is contained in:
parent
d9d76839c5
commit
dbb9e5363c
1 changed files with 3 additions and 0 deletions
|
@ -105,6 +105,9 @@ const formatFunction = {
|
|||
|
||||
function renderPart(part) {
|
||||
const f = formatFunction[part.type];
|
||||
if (!f) {
|
||||
return text(`[unknown part type ${part.type}]`);
|
||||
}
|
||||
return f(part);
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue