Commit a1e1a438 authored by Gabriel Monnerat's avatar Gabriel Monnerat Committed by Romain Courteaud

erp5_web_renderjs_ui: Add class to link only if class_name is defined

parent 420849ab
......@@ -22,7 +22,10 @@
dd_element = document.createElement('dd');
dd_element.setAttribute('class', 'document-listview');
a_element = document.createElement('a');
a_element.setAttribute('class', action_list[i].class_name);
if (action_list[i].class_name) {
// Avoid add class='undefined' in HTML
a_element.setAttribute('class', action_list[i].class_name);
}
a_element.href = href_list[index + i];
a_element.textContent = action_list[i].title;
dd_element.appendChild(a_element);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment