Skip to content

Commit c797a4f

Browse files
committed
refactor(LightDom): refactor the code
1 parent a02e7b5 commit c797a4f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

modules/core/src/compiler/shadow_dom_emulation/light_dom.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export class LightDom {
3838

3939
redistribute() {
4040
var tags = this.contentTags();
41-
if (isPresent(tags)) {
41+
if (tags.length > 0) {
4242
redistributeNodes(tags, this.expandedDomNodes());
4343
}
4444
}
@@ -47,8 +47,8 @@ export class LightDom {
4747
return this._collectAllContentTags(this.shadowDomView, []);
4848
}
4949

50-
_collectAllContentTags(item, acc:List<Content>):List<Content> {
51-
var eis = item.elementInjectors;
50+
_collectAllContentTags(view: View, acc:List<Content>):List<Content> {
51+
var eis = view.elementInjectors;
5252
for (var i = 0; i < eis.length; ++i) {
5353
var ei = eis[i];
5454
if (isBlank(ei)) continue;
@@ -58,8 +58,8 @@ export class LightDom {
5858

5959
} else if (ei.hasPreBuiltObject(ViewPort)) {
6060
var vp = ei.get(ViewPort);
61-
ListWrapper.forEach(vp.contentTagContainers(), (c) => {
62-
this._collectAllContentTags(c, acc);
61+
ListWrapper.forEach(vp.contentTagContainers(), (view) => {
62+
this._collectAllContentTags(view, acc);
6363
});
6464
}
6565
}

0 commit comments

Comments
 (0)