Skip to content

Commit

Permalink
Revert "fix: optimize performance and reduce package size"
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanyan authored Sep 15, 2019
1 parent 2a7929d commit 998e2c4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/rax/src/vdom/composite.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,8 @@ class CompositeComponent extends BaseComponent {
// Reset pending queue
this.__pendingStateQueue = null;
let nextState = assign({}, instance.state);
let partial;
while (partial = queue.shift()) {
for (let i = 0; i < queue.length; i++) {
let partial = queue[i];
assign(
nextState,
isFunction(partial) ?
Expand Down
6 changes: 3 additions & 3 deletions packages/rax/src/vdom/fragment.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ class FragmentComponent extends NativeComponent {
let fragment = this.__getNativeNode();

return this.__mountChildrenImpl(this._parent, children, context, (nativeNode) => {
let node;
nativeNode = toArray(nativeNode);
while (node = nativeNode.shift()) {
fragment.push(node);

for (let i = 0; i < nativeNode.length; i++) {
fragment.push(nativeNode[i]);
}
});
}
Expand Down

0 comments on commit 998e2c4

Please # to comment.