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

View file

@ -105,6 +105,9 @@ const formatFunction = {
function renderPart(part) { function renderPart(part) {
const f = formatFunction[part.type]; const f = formatFunction[part.type];
if (!f) {
return text(`[unknown part type ${part.type}]`);
}
return f(part); return f(part);
} }