Skip to content

Commit

Permalink
Fix reload conditions.
Browse files Browse the repository at this point in the history
  • Loading branch information
busykai authored and humphd committed May 26, 2015
1 parent 9349c4c commit eceb1d6
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/language/HTMLDOMDiff.js
Original file line number Diff line number Diff line change
Expand Up @@ -641,13 +641,14 @@ define(function (require, exports, module) {
*/
function shouldReload(oldNode, newNode) {
// if either new or old node is root element of the DOM
if (!oldNode.parent || !newNode.parent) {
switch (oldNode.tag) {
case "html":
case "script":
return true;
}
if (oldNode.tag && oldNode.tag === "script") {
return true;
}
if (newNode.tag && newNode.tag === "script") {
switch (newNode.tag) {
case "html":
case "script":
return true;
}
return false;
Expand Down

0 comments on commit eceb1d6

Please sign in to comment.