Repair dumb logic bugs introduced during port to TypeScript
This commit is contained in:
parent
b5a4a150ac
commit
65bae07fc1
|
@ -176,10 +176,8 @@ function spawnUIFragmentFactory<T>(thisFacet: Facet<T>) {
|
|||
let insertionPoint = findInsertionPoint(anchorNode, orderBy, fragmentId);
|
||||
while (true) {
|
||||
let n = insertionPoint ? insertionPoint.previousSibling : anchorNode.lastChild;
|
||||
if (n && hasSortKey(n, orderBy, fragmentId)) {
|
||||
// auto-updates previousSibling/lastChild
|
||||
n.parentNode?.removeChild(n);
|
||||
}
|
||||
if (!(n && hasSortKey(n, orderBy, fragmentId))) break;
|
||||
n.parentNode?.removeChild(n); // auto-updates previousSibling/lastChild
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -206,8 +204,7 @@ function spawnUIFragmentFactory<T>(thisFacet: Facet<T>) {
|
|||
let insertionPoint = findInsertionPoint(anchorNode, orderBy, fragmentId);
|
||||
while (true) {
|
||||
let uiNode = insertionPoint ? insertionPoint.previousSibling : anchorNode.lastChild;
|
||||
if (uiNode === null) break;
|
||||
if (!hasSortKey(uiNode, orderBy, fragmentId)) break;
|
||||
if (!(uiNode && hasSortKey(uiNode, orderBy, fragmentId))) break;
|
||||
if (isQueryableNode(uiNode)) {
|
||||
selectorMatch(uiNode, selector).forEach(
|
||||
eventUpdater(cleanEventType(eventType), handlerClosure, install));
|
||||
|
|
Loading…
Reference in New Issue