Skip to content
Snippets Groups Projects
Commit 4d8db6a6 authored by François  LAURENT's avatar François LAURENT
Browse files

fixes #43

parent 0f26c94d
No related branches found
No related tags found
No related merge requests found
......@@ -73,7 +73,11 @@ const LarvaTagger = (function () {
function insertNewTag(table, html) {
const frag = document.createRange().createContextualFragment(html);
const newtr = frag.firstChild.firstChild.firstChild;
const tbody = table.getElementsByTagName('tbody')[0];
let tbody = table.getElementsByTagName('tbody')[0];
if (tbody == null) {
tbody = document.createElement('tbody');
table.appendChild(tbody);
}
tbody.appendChild(newtr);
newtr.scrollIntoView();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment