Skip to content

Commit

Permalink
Fix hydrate empty child bug
Browse files Browse the repository at this point in the history
  • Loading branch information
luwes committed May 10, 2020
1 parent e9158e8 commit 0d66864
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/sinuous/hydrate/src/hydrate.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,11 @@ export function hydrate(delta, root) {
selector = '#';
} else if (delta._props && (prop = delta._props.class)) {
selector = '.';
} else if ((prop = delta.type));
else {
} else if ((prop = delta.type)){
// delta.type is truthy
} else {
isRootFragment = true;
return findRootSelector(delta._children[0]());
return delta._children && findRootSelector(delta._children[0]());
}

return (
Expand Down

0 comments on commit 0d66864

Please sign in to comment.