Skip to content

Commit 9a8dc3d

Browse files
authored
Merge pull request #4680 from preactjs/fix-memory-leak
2 parents 44ef318 + 72154eb commit 9a8dc3d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/diff/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,10 @@ export function diff(
260260
tmp != NULL && tmp.type === Fragment && tmp.key == NULL;
261261
let renderResult = isTopLevelFragment ? tmp.props.children : tmp;
262262

263+
if (isTopLevelFragment) {
264+
tmp.props.children = null;
265+
}
266+
263267
oldDom = diffChildren(
264268
parentDom,
265269
isArray(renderResult) ? renderResult : [renderResult],

0 commit comments

Comments
 (0)