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);
|
let insertionPoint = findInsertionPoint(anchorNode, orderBy, fragmentId);
|
||||||
while (true) {
|
while (true) {
|
||||||
let n = insertionPoint ? insertionPoint.previousSibling : anchorNode.lastChild;
|
let n = insertionPoint ? insertionPoint.previousSibling : anchorNode.lastChild;
|
||||||
if (n && hasSortKey(n, orderBy, fragmentId)) {
|
if (!(n && hasSortKey(n, orderBy, fragmentId))) break;
|
||||||
// auto-updates previousSibling/lastChild
|
n.parentNode?.removeChild(n); // auto-updates previousSibling/lastChild
|
||||||
n.parentNode?.removeChild(n);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -206,8 +204,7 @@ function spawnUIFragmentFactory<T>(thisFacet: Facet<T>) {
|
||||||
let insertionPoint = findInsertionPoint(anchorNode, orderBy, fragmentId);
|
let insertionPoint = findInsertionPoint(anchorNode, orderBy, fragmentId);
|
||||||
while (true) {
|
while (true) {
|
||||||
let uiNode = insertionPoint ? insertionPoint.previousSibling : anchorNode.lastChild;
|
let uiNode = insertionPoint ? insertionPoint.previousSibling : anchorNode.lastChild;
|
||||||
if (uiNode === null) break;
|
if (!(uiNode && hasSortKey(uiNode, orderBy, fragmentId))) break;
|
||||||
if (!hasSortKey(uiNode, orderBy, fragmentId)) break;
|
|
||||||
if (isQueryableNode(uiNode)) {
|
if (isQueryableNode(uiNode)) {
|
||||||
selectorMatch(uiNode, selector).forEach(
|
selectorMatch(uiNode, selector).forEach(
|
||||||
eventUpdater(cleanEventType(eventType), handlerClosure, install));
|
eventUpdater(cleanEventType(eventType), handlerClosure, install));
|
||||||
|
|
Loading…
Reference in New Issue