Skip to content

Commit 5aab610

Browse files
committed
Uses VirtualDOM.render()
1 parent 6a5f512 commit 5aab610

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

packages/filebrowser/src/listing.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2660,24 +2660,24 @@ export namespace DirListing {
26602660
checkbox.checked = selected ?? false;
26612661
}
26622662

2663-
let modHTML = '';
26642663
let modTitle = '';
26652664
if (model.last_modified) {
26662665
// Provide multiple formats, with container queries used to display exactly one
2667-
modHTML = ['narrow', 'short', 'long']
2668-
.map(
2669-
style =>
2670-
`<div class='${ITEM_MODIFIED_CLASS}-${style}'>` +
2666+
VirtualDOM.render(
2667+
['narrow', 'short', 'long'].map(style =>
2668+
h.div(
2669+
{ className: `${ITEM_MODIFIED_CLASS}-${style}` },
26712670
Time.formatHuman(
26722671
new Date(model.last_modified),
26732672
style as Time.HumanStyle
2674-
) +
2675-
'</div>'
2676-
)
2677-
.join('');
2673+
)
2674+
)
2675+
),
2676+
modified
2677+
);
2678+
26782679
modTitle = Time.format(new Date(model.last_modified));
26792680
}
2680-
modified.innerHTML = modHTML;
26812681
modified.title = modTitle;
26822682
}
26832683

0 commit comments

Comments
 (0)