vaderjs 1.9.3 → 1.9.5

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
@@ -3,7 +3,7 @@ export const document = (element: any) => {
3
3
  let el = type === null ? `` : `<${type}`
4
4
  let attributes = element.props;
5
5
  let children = element.children;
6
- if(type != null){
6
+ if(type != null && type !== false && type !== true && type !== undefined){
7
7
  for (let key in attributes) {
8
8
  if(key === "key"){
9
9
  el += ` key="${attributes[key]}"`;
@@ -33,7 +33,7 @@ export const document = (element: any) => {
33
33
 
34
34
  }
35
35
  }
36
- el += type === null ? `` : `>`
36
+ el += type === null || type == false ? `` : `>`
37
37
  if(children === null || children === undefined){
38
38
  return el;
39
39
  }
@@ -45,11 +45,14 @@ export const document = (element: any) => {
45
45
  });
46
46
  }
47
47
  if(typeof child === "function"){
48
- el += document(child());
48
+ el += document(child())
49
49
  }else
50
50
  if (typeof child === "object") {
51
51
  el += document(child);
52
52
  }else{
53
+ if(child === null || child === false || child === undefined){
54
+ continue;
55
+ }
53
56
  el += child;
54
57
  }
55
58
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vaderjs",
3
- "version": "1.9.3",
3
+ "version": "1.9.5",
4
4
  "description": "A simple and powerful JavaScript library for building modern web applications.",
5
5
  "bin": {
6
6
  "vaderjs": "./main.js"