Skip to content

Commit

Permalink
Crel: Check for invalid children
Browse files Browse the repository at this point in the history
  • Loading branch information
fluvf committed Mar 5, 2019
1 parent 3983985 commit 9b45acf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crel.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This might make it harder to read at times, but the code's intention should be t
isType = (object, type) => typeof object === type,
// Recursively appends children to given element if they're not `null`. As a text node if not already an element
appendChild = (element, child) => {
if (child !== null) {
if (child != null) {
if (Array.isArray(child)) { // Support (deeply) nested child elements
child.map(subChild => appendChild(element, subChild));
} else {
Expand Down

0 comments on commit 9b45acf

Please sign in to comment.