1
1
mirror of https://github.com/github/semantic.git synced 2024-11-29 02:44:36 +03:00

Only wrap elements that exist.

This commit is contained in:
Rob Rix 2015-10-13 11:22:56 -04:00
parent ec9c29e29d
commit 91093f1aac

View File

@ -24,6 +24,7 @@
}
function wrap(tagName, element) {
if (element == null) { return null; }
var node = document.createElement(tagName);
node.appendChild(element);
return node;