fix(shadow_dom_emulation): handle the case when the array of element injectors has nulls

This commit is contained in:
vsavkin
2015-02-20 15:19:51 -08:00
parent 7aa031b3d3
commit 29f5ee0c29
2 changed files with 15 additions and 1 deletions
@@ -180,6 +180,19 @@ export function main() {
expect(toHtml(lightDom.expandedDomNodes())).toEqual(["<a></a>"]);
});
it("should work when the element injector array contains nulls", () => {
var lightDomEl = el("<div><a></a></div>")
var lightDomView = new FakeView([null]);
var lightDom = new LightDom(
lightDomView,
new FakeView(),
lightDomEl);
expect(toHtml(lightDom.expandedDomNodes())).toEqual(["<a></a>"]);
});
});
describe("redistribute", () => {