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])); |                     this.children.push(new html(items[i])); | ||||||
|                 } else if (items[i] instanceof String || typeof items[i] === 'string') { |                 } else if (items[i] instanceof String || typeof items[i] === 'string') { | ||||||
|                     this.children.push(new html(items[i])); |                     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) { |                 } else if (items[i] instanceof IgniteTemplate || items[i].prototype instanceof IgniteTemplate) { | ||||||
|                     this.children.push(items[i]); |                     this.children.push(items[i]); | ||||||
|                 } else { |                 } else { | ||||||
| @@ -89,6 +91,8 @@ class IgniteTemplate { | |||||||
|                 this.children.push(new html(items[i])); |                 this.children.push(new html(items[i])); | ||||||
|             } else if (items[i] instanceof String || typeof items[i] === 'string') { |             } else if (items[i] instanceof String || typeof items[i] === 'string') { | ||||||
|                 this.children.push(new html(items[i])); |                 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) { |             } else if (items[i] instanceof IgniteTemplate || items[i].prototype instanceof IgniteTemplate) { | ||||||
|                 this.children.push(items[i]); |                 this.children.push(items[i]); | ||||||
|             } else { |             } else { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user