Teact: Fix moving element to the end of fast list (follow-up)
This commit is contained in:
parent
a953869683
commit
533e82eb3c
@ -373,9 +373,7 @@ function getNextSibling($current: VirtualElement): ChildNode | undefined {
|
|||||||
return getNextSibling(lastChild);
|
return getNextSibling(lastChild);
|
||||||
}
|
}
|
||||||
|
|
||||||
const target = $current.target!;
|
return $current.target!.nextSibling || undefined;
|
||||||
const { nextSibling } = target;
|
|
||||||
return nextSibling || undefined;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderChildren(
|
function renderChildren(
|
||||||
@ -401,7 +399,7 @@ function renderChildren(
|
|||||||
const fragment = newChildrenLength > currentChildrenLength ? document.createDocumentFragment() : undefined;
|
const fragment = newChildrenLength > currentChildrenLength ? document.createDocumentFragment() : undefined;
|
||||||
const lastCurrentChild = $current.children[currentChildrenLength - 1];
|
const lastCurrentChild = $current.children[currentChildrenLength - 1];
|
||||||
const fragmentNextSibling = fragment && (
|
const fragmentNextSibling = fragment && (
|
||||||
nextSibling || lastCurrentChild ? getNextSibling(lastCurrentChild) : undefined
|
nextSibling || (lastCurrentChild ? getNextSibling(lastCurrentChild) : undefined)
|
||||||
);
|
);
|
||||||
|
|
||||||
for (let i = 0; i < maxLength; i++) {
|
for (let i = 0; i < maxLength; i++) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user