Don't set innerHTML to false

Mistakenly setting the innerHTML to false, so went back to classic
if/else if statements to only set on these 2 cases
This commit is contained in:
Matt Pass
2013-05-22 17:19:20 +01:00
parent fabfcbd742
commit e1d1891de8

View File

@@ -208,12 +208,11 @@ function createNewCMInstance(num) {
// Update HTML edited files live
if (top.ICEcoder.previewWindow.location) {
if (top.ICEcoder.previewWindow.location.pathname==filepath) {
top.ICEcoder.previewWindow.document.documentElement.innerHTML =
["htm","html","txt"].indexOf(fileExt) > -1
? window['cM'+num].getValue()
: ["md"].indexOf(fileExt) > -1
? mmd(window['cM'+num].getValue())
: false;
if (["htm","html","txt"].indexOf(fileExt) > -1) {
top.ICEcoder.previewWindow.document.documentElement.innerHTML = window['cM'+num].getValue();
} else if (["md"].indexOf(fileExt) > -1) {
top.ICEcoder.previewWindow.document.documentElement.innerHTML = mmd(window['cM'+num].getValue());
}
} else if (["css"].indexOf(fileExt) > -1) {
if (top.ICEcoder.previewWindow.document.documentElement.innerHTML.indexOf(filename) > -1) {
var css = window['cM'+num].getValue();