8000 Check for null children in appendChildren helper · edkeeble/plotly.js@20e93d2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 20e93d2

Browse files
committed
Check for null children in appendChildren helper
1 parent 7f64c9f commit 20e93d2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/range/helpers.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ exports.setAttributes = function setAttributes(el, attributes) {
99

1010
exports.appendChildren = function appendChildren(el, children) {
1111
for(var i = 0; i < children.length; i++) {
12-
el.appendChild(children[i]);
12+
if(children[i]) {
13+
el.appendChild(children[i]);
14+
}
1315
}
1416
};

0 commit comments

Comments
 (0)
0