thelounge/client/components/ParsedMessage.vue
2019-02-12 12:48:43 +02:00

19 lines
414 B
Vue

<script>
const parse = require("../js/libs/handlebars/parse");
export default {
name: "ParsedMessage",
functional: true,
props: {
text: String,
message: Object,
},
render(createElement, context) {
if (typeof context.props.text !== "undefined") {
return parse(createElement, context.props.text);
}
return parse(createElement, context.props.message.text, context.props.message);
},
};
</script>