Commit e01fe983 authored by Sven Franck's avatar Sven Franck

fixed table with no results throwing error on initial load

parent 507f9afa
......@@ -1408,18 +1408,20 @@
);
}
// add elements when not updating, if updating only add dynamic
// TODO: refactor into something understandable on first sight...
if (update !== true || element.dynamic) {
content = app.setContent(element, {}, update);
if (no_result) {
if (update) {
content.appendChild(no_content(spec.property_dict.no_items));
} else {
content.querySelector("tbody").appendChild(no_content(spec.property_dict.no_items));
}
}
// dynamic element being updated - 0 results need placeholder
if (element.dynamic && no_result) {
if (update) {
content.appendChild(no_content(spec.property_dict.no_items));
} else {
content.querySelector("tbody").appendChild(no_content(spec.property_dict.no_items));
}
target.appendChild(content);
}
target.appendChild(content);
}
// assemble and/or return
......
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