anu-verzum 1.6.0 → 1.7.0

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/README.md CHANGED
@@ -4,7 +4,6 @@
4
4
 
5
5
  <h3>@author: <strong>Anubis-programmer</strong></h3>
6
6
  <h3>@license: <strong>MIT</strong></h3>
7
- <h3>@version: <strong>1.6.0</strong></h3>
8
7
 
9
8
  <br>
10
9
 
@@ -13,11 +13,14 @@ const createTextElement = value => ({
13
13
  });
14
14
  const createElement = (type, config, ...args) => {
15
15
  const props = Object.assign({}, config);
16
- const hasChildren = args.length > 0;
17
- const rawChildren = hasChildren ? [].concat(...args) : [];
18
- props.children = rawChildren.filter(c => c !== null && c !== false).map(c => typeof c === 'function' ? createElement(c, {
19
- ...(c.props || {})
20
- }) : c instanceof Object ? c : createTextElement(c));
16
+ if (args.length > 0) {
17
+ const rawChildren = [].concat(...args);
18
+ props.children = rawChildren.filter(c => c !== null && c !== false).map(c => typeof c === 'function' ? createElement(c, {
19
+ ...(c.props || {})
20
+ }) : c instanceof Object ? c : createTextElement(c));
21
+ } else {
22
+ props.children = props.children ?? [];
23
+ }
21
24
  return {
22
25
  type,
23
26
  props
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anu-verzum",
3
- "version": "1.6.0",
3
+ "version": "1.7.0",
4
4
  "description": "A \"React-like\" UI library that supports JSX syntax, Redux-like state management, array-rendering, i18n, routing and many more.",
5
5
  "keywords": [
6
6
  "anu-verzum",