render should return nodes otherwise the mapView binding doesn't work

this broke e2ee messages appearing when decrypted
This commit is contained in:
Bruno Windels 2020-10-21 12:10:42 +02:00
parent 1c20556c8d
commit f1aef6c034

View File

@ -16,6 +16,7 @@ limitations under the License.
import {TemplateView} from "../../../general/TemplateView.js"; import {TemplateView} from "../../../general/TemplateView.js";
import {StaticView} from "../../../general/StaticView.js"; import {StaticView} from "../../../general/StaticView.js";
import {text} from "../../../general/html.js";
import {renderMessage} from "./common.js"; import {renderMessage} from "./common.js";
export class TextMessageView extends TemplateView { export class TextMessageView extends TemplateView {
@ -31,7 +32,7 @@ class BodyView extends StaticView {
render(t, value) { render(t, value) {
const lines = (value || "").split("\n"); const lines = (value || "").split("\n");
if (lines.length === 1) { if (lines.length === 1) {
return lines[0]; return text(lines[0]);
} }
const elements = []; const elements = [];
for (const line of lines) { for (const line of lines) {