@unsetsoft/ryunixjs 0.4.15-nightly.21 → 0.4.15-nightly.24

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/dist/Ryunix.js CHANGED
@@ -621,7 +621,15 @@
621
621
  vars.hookIndex = 0;
622
622
  vars.wipFiber.hooks = [];
623
623
  const children = [fiber.type(fiber.props)];
624
- reconcileChildren(fiber, children);
624
+ let childArr = [];
625
+ if (Array.isArray(results)) {
626
+ // Fragment results returns array
627
+ childArr = [...children];
628
+ } else {
629
+ // Normal function component returns single root node
630
+ childArr = [children];
631
+ }
632
+ reconcileChildren(fiber, childArr);
625
633
  };
626
634
 
627
635
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unsetsoft/ryunixjs",
3
- "version": "0.4.15-nightly.21",
3
+ "version": "0.4.15-nightly.24",
4
4
  "license": "MIT",
5
5
  "main": "./dist/Ryunix.js",
6
6
  "types": "./dist/Ryunix.d.ts",
@@ -14,7 +14,15 @@ const updateFunctionComponent = (fiber) => {
14
14
  vars.hookIndex = 0
15
15
  vars.wipFiber.hooks = []
16
16
  const children = [fiber.type(fiber.props)]
17
- reconcileChildren(fiber, children)
17
+ let childArr = []
18
+ if (Array.isArray(results)) {
19
+ // Fragment results returns array
20
+ childArr = [...children]
21
+ } else {
22
+ // Normal function component returns single root node
23
+ childArr = [children]
24
+ }
25
+ reconcileChildren(fiber, childArr)
18
26
  }
19
27
 
20
28
  /**