Skip to content

Commit

Permalink
golf some bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock committed Oct 11, 2020
1 parent 0c1182d commit a679795
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions compat/src/suspense.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,11 @@ options._catchError = function(error, newVNode, oldVNode) {
function detachedClone(vnode) {
if (vnode) {
if (vnode._component && vnode._component.__hooks) {
if (vnode._component.__hooks._list.length) {
vnode._component.__hooks._list.forEach(effect => {
if (typeof effect._cleanup == 'function') effect._cleanup();
});
}
vnode._component.__hooks._list.forEach(effect => {
if (typeof effect._cleanup == 'function') effect._cleanup();
});

vnode._component.__hooks = {
_list: [],
_pendingEffects: []
};
vnode._component.__hooks = null;
}

vnode = assign({}, vnode);
Expand Down

0 comments on commit a679795

Please sign in to comment.