guard against part types that have not been impl in the view

This commit is contained in:
Bruno Windels 2021-08-07 09:00:41 +02:00
parent d9d76839c5
commit dbb9e5363c
1 changed files with 3 additions and 0 deletions

View File

@ -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);
}