fix(ivy): correctly remove placeholders inside of *ngFor with runtime i18n (#29308)
Following my previous change for placeholders removal, some special code that was used to find the last created node was no longer needed and had wrong interactions with the *ngFor directive. Removing it fixed the issue. PR Close #29308
This commit is contained in:

committed by
Matias Niemelä

parent
487d4157ac
commit
7c297e05f3
@ -626,16 +626,6 @@ export function i18nEnd(): void {
|
||||
i18nEndFirstPass(tView);
|
||||
}
|
||||
|
||||
function findLastNode(node: TNode): TNode {
|
||||
while (node.next) {
|
||||
node = node.next;
|
||||
}
|
||||
if (node.child) {
|
||||
return findLastNode(node.child);
|
||||
}
|
||||
return node;
|
||||
}
|
||||
|
||||
/**
|
||||
* See `i18nEnd` above.
|
||||
*/
|
||||
@ -651,10 +641,8 @@ function i18nEndFirstPass(tView: TView) {
|
||||
|
||||
// Find the last node that was added before `i18nEnd`
|
||||
let lastCreatedNode = getPreviousOrParentTNode();
|
||||
if (lastCreatedNode.child) {
|
||||
lastCreatedNode = findLastNode(lastCreatedNode.child);
|
||||
}
|
||||
|
||||
// Read the instructions to insert/move/remove DOM elements
|
||||
const visitedNodes = readCreateOpCodes(rootIndex, tI18n.create, tI18n.icus, viewData);
|
||||
|
||||
// Remove deleted nodes
|
||||
|
Reference in New Issue
Block a user