mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
with !interactive, an array of an array is not a valid Child value
why didn't this fail before?
This commit is contained in:
parent
bae8dc7dd7
commit
f02d52ce4c
@ -33,6 +33,10 @@ export class BaseMessageView extends TemplateView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render(t, vm) {
|
render(t, vm) {
|
||||||
|
const children = [this.renderMessageBody(t, vm)];
|
||||||
|
if (this._interactive) {
|
||||||
|
children.push(t.button({className: "Timeline_messageOptions"}, "⋯"));
|
||||||
|
}
|
||||||
const li = t.el(this._tagName, {className: {
|
const li = t.el(this._tagName, {className: {
|
||||||
"Timeline_message": true,
|
"Timeline_message": true,
|
||||||
own: vm.isOwn,
|
own: vm.isOwn,
|
||||||
@ -40,13 +44,8 @@ export class BaseMessageView extends TemplateView {
|
|||||||
unverified: vm.isUnverified,
|
unverified: vm.isUnverified,
|
||||||
disabled: !this._interactive,
|
disabled: !this._interactive,
|
||||||
continuation: vm => vm.isContinuation,
|
continuation: vm => vm.isContinuation,
|
||||||
}}, [
|
|
||||||
// dynamically added and removed nodes are handled below
|
|
||||||
this.renderMessageBody(t, vm),
|
|
||||||
// should be after body as it is overlayed on top
|
|
||||||
this._interactive ? t.button({className: "Timeline_messageOptions"}, "⋯") : [],
|
|
||||||
]);
|
|
||||||
const avatar = t.a({href: vm.memberPanelLink, className: "Timeline_messageAvatar"}, [renderStaticAvatar(vm, 30)]);
|
const avatar = t.a({href: vm.memberPanelLink, className: "Timeline_messageAvatar"}, [renderStaticAvatar(vm, 30)]);
|
||||||
|
}}, children);
|
||||||
// given that there can be many tiles, we don't add
|
// given that there can be many tiles, we don't add
|
||||||
// unneeded DOM nodes in case of a continuation, and we add it
|
// unneeded DOM nodes in case of a continuation, and we add it
|
||||||
// with a side-effect binding to not have to create sub views,
|
// with a side-effect binding to not have to create sub views,
|
||||||
|
Loading…
Reference in New Issue
Block a user