vaderjs 1.5.6 → 1.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/document/index.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  export const document = (element: any) => {
2
2
  let type = element.type;
3
- let el = type === null ? `` : `<${type}`
4
- console.log(el)
3
+ let el = type === null ? `` : `<${type}`
5
4
  let attributes = element.props;
6
5
  let children = element.children;
7
6
  if(type != null){
@@ -35,9 +34,11 @@ export const document = (element: any) => {
35
34
  }
36
35
  }
37
36
  el += type === null ? `` : `>`
37
+ if(children === null || children === undefined){
38
+ return el;
39
+ }
38
40
  for (let i = 0;i < children.length; i++) {
39
- let child = children[i];
40
- console.log(child)
41
+ let child = children[i];
41
42
  if (Array.isArray(child)) {
42
43
  child.forEach((c) => {
43
44
  el += document(c);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vaderjs",
3
- "version": "1.5.6",
3
+ "version": "1.5.7",
4
4
  "description": "A simple and powerful JavaScript library for building modern web applications.",
5
5
  "bin": {
6
6
  "vaderjs": "./main.js"