Added support for numbers being used as children, they now get wrapped automatically in a html template.
This commit is contained in:
		| @@ -19,6 +19,8 @@ class IgniteTemplate { | ||||
|                     this.children.push(new html(items[i])); | ||||
|                 } else if (items[i] instanceof String || typeof items[i] === 'string') { | ||||
|                     this.children.push(new html(items[i])); | ||||
|                 } else if (items[i] instanceof Number || typeof items[i] === 'number') { | ||||
|                     this.children.push(new html(items[i])); | ||||
|                 } else if (items[i] instanceof IgniteTemplate || items[i].prototype instanceof IgniteTemplate) { | ||||
|                     this.children.push(items[i]); | ||||
|                 } else { | ||||
| @@ -89,6 +91,8 @@ class IgniteTemplate { | ||||
|                 this.children.push(new html(items[i])); | ||||
|             } else if (items[i] instanceof String || typeof items[i] === 'string') { | ||||
|                 this.children.push(new html(items[i])); | ||||
|             } else if (items[i] instanceof Number || typeof items[i] === 'number') { | ||||
|                 this.children.push(new html(items[i])); | ||||
|             } else if (items[i] instanceof IgniteTemplate || items[i].prototype instanceof IgniteTemplate) { | ||||
|                 this.children.push(items[i]); | ||||
|             } else { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user