components/Message: fix eslint errors

This commit is contained in:
Reto Brunner 2024-04-21 14:20:22 +02:00
parent 6241eed8f4
commit 6c9d2c36a1

View file

@ -150,10 +150,14 @@ export default defineComponent({
});
const messageComponent = computed(() => {
return "message-" + props.message.type;
return "message-" + (props.message.type || "invalid"); // TODO: force existence of type in sharedmsg
});
const isAction = () => {
if (!props.message.type) {
return false;
}
return typeof MessageTypes["message-" + props.message.type] !== "undefined";
};