Commit deb033ee 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 b5f4acb9
......@@ -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);
......
......@@ -234,7 +234,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>987.27464.21813.55483</string> </value>
<value> <string>988.37340.38701.21060</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -252,7 +252,7 @@
</tuple>
<state>
<tuple>
<float>1604411452.55</float>
<float>1607643211.55</float>
<string>UTC</string>
</tuple>
</state>
......
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