jsx: viewFragment support null or undefined
This commit is contained in:
		| @@ -479,7 +479,7 @@ export abstract class Superview extends View { | ||||
| } | ||||
| export type ViewArray = View[] | ||||
|  | ||||
| export type ViewFragment = View | ViewArray | ||||
| export type ViewFragment = View | ViewArray | undefined | null | ||||
|  | ||||
| export abstract class Group extends Superview { | ||||
|  | ||||
| @@ -499,7 +499,7 @@ export abstract class Group extends Superview { | ||||
|             e.forEach(e => this.addInnerElement(e)) | ||||
|         } else if (e instanceof View) { | ||||
|             this.addChild(e) | ||||
|         } else { | ||||
|         } else if (!!e) { | ||||
|             loge(`Not allowed to add ${typeof e}`) | ||||
|         } | ||||
|     } | ||||
|   | ||||
| @@ -504,7 +504,7 @@ export abstract class Superview extends View { | ||||
|  | ||||
| export type ViewArray = View[] | ||||
|  | ||||
| export type ViewFragment = View | ViewArray | ||||
| export type ViewFragment = View | ViewArray | undefined | null | ||||
|  | ||||
| export abstract class Group extends Superview implements JSX.ElementChildrenAttribute { | ||||
|  | ||||
| @@ -540,7 +540,7 @@ export abstract class Group extends Superview implements JSX.ElementChildrenAttr | ||||
|             e.forEach(e => this.addInnerElement(e)) | ||||
|         } else if (e instanceof View) { | ||||
|             this.addChild(e) | ||||
|         } else { | ||||
|         } else if (!!e) { | ||||
|             loge(`Not allowed to add ${typeof e}`) | ||||
|         } | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user