Test if width is set before testing if it ends width '%'

Closes #14578
This commit is contained in:
Cédric Krier committed 2026-02-04 15:29:51 +01:00
1 parent 5d8e111890
commit c537a8df33
1 file changed
+1 -1
+1 -1
View File
@@ -1070,7 +1070,7 @@
} else {
width = column.col.data('default-width');
}
if (width.endsWith('%')) {
if (width && width.endsWith('%')) {
width = parseInt(width.slice(0, -1), 10) / 100;
if (column.attributes.expand) {
width /= parseInt(column.attributes.expand, 10);