Skip to content

Commit

Permalink
Fix incorrect usage of scheduleUnlayout from related bug (#28895)
Browse files Browse the repository at this point in the history
  • Loading branch information
krdwan authored Jun 15, 2020
1 parent 156ab59 commit afa57dc
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions extensions/amp-list/0.1/amp-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -606,13 +606,9 @@ export class AmpList extends AMP.BaseElement {
'update': false,
});
}
toArray(
dev().assertElement(this.container_).children
).forEach((child) =>
this.owners_./*OK*/ scheduleUnlayout(
dev().assertElement(this.container_),
child
)
this.owners_./*OK*/ scheduleUnlayout(
this.element,
dev().assertElement(this.container_)
);
removeChildren(dev().assertElement(this.container_));
};
Expand Down Expand Up @@ -1069,9 +1065,7 @@ export class AmpList extends AMP.BaseElement {
this.diff_(container, elements);
} else {
if (!opt_append) {
toArray(container.children).forEach((child) =>
this.owners_./*OK*/ scheduleUnlayout(container, child)
);
this.owners_./*OK*/ scheduleUnlayout(this.element, container);
removeChildren(container);
}
this.addElementsToContainer_(elements, container);
Expand Down

0 comments on commit afa57dc

Please sign in to comment.