From dd520faaf92fd3089b7010b9fab740d599044cc2 Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Thu, 20 Jul 2017 14:36:32 +0200 Subject: [PATCH] Fixed diff --- scripts/Diff.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/Diff.ts b/scripts/Diff.ts index b0d01c2f..88cc90fc 100644 --- a/scripts/Diff.ts +++ b/scripts/Diff.ts @@ -13,7 +13,7 @@ export class Diff { } Diff.container.innerHTML = html - Diff.childNodes(aRoot.getElementsByTagName("body")[0], Diff.container.getElementsByTagName("body")[0]) + Diff.childNodes(aRoot, Diff.container) } // root will diff the document root element with the given HTML string and apply DOM mutations. @@ -23,7 +23,7 @@ export class Diff { } Diff.rootContainer.innerHTML = html.replace("", "") - Diff.childNodes(aRoot, Diff.rootContainer) + Diff.childNodes(aRoot.getElementsByTagName("body")[0], Diff.rootContainer.getElementsByTagName("body")[0]) } // childNodes diffs the child nodes of 2 given elements and applies DOM mutations.