Clean invalid classname and fix potential TypeError

This commit is contained in:
yflory 2025-04-23 14:20:19 +02:00
parent d120f5ede1
commit bb518e4ef5

View File

@ -189,8 +189,7 @@ define([
const table = h('table.cp-sidebar-table');
if (header) {
const headerValues = header.map(value => {
const lastWord = value.split(' ').pop(); // Extracting the last word
return h('th', { class: lastWord.toLowerCase() }, value); // Modified to use the last word
return h('th', value);
});
const headerRow = h('thead', h('tr', headerValues));
table.appendChild(headerRow);