Skip to content
Snippets Groups Projects
Commit 7c17d1e2 authored by codedust's avatar codedust
Browse files

Show models even if not all branches are loaded successfully

parent f3ed11a7
No related branches found
No related tags found
No related merge requests found
...@@ -1071,6 +1071,9 @@ var firmwarewizard = function() { ...@@ -1071,6 +1071,9 @@ var firmwarewizard = function() {
xmlhttp.onreadystatechange = function() { xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
callback(xmlhttp.responseText, url); callback(xmlhttp.responseText, url);
} else if (xmlhttp.readyState == 4) {
console.log("Could not load " + url);
callback(null, url);
} }
}; };
xmlhttp.open('GET', url, true); xmlhttp.open('GET', url, true);
...@@ -1102,8 +1105,8 @@ var firmwarewizard = function() { ...@@ -1102,8 +1105,8 @@ var firmwarewizard = function() {
} while (hrefMatch); } while (hrefMatch);
// check if we loaded all directories // check if we loaded all directories
sitesLoadedSuccessfully++; directoryLoadCount++;
if (sitesLoadedSuccessfully == Object.keys(config.directories).length) { if (directoryLoadCount == Object.keys(config.directories).length) {
callback(); callback();
} }
}; };
...@@ -1127,7 +1130,7 @@ var firmwarewizard = function() { ...@@ -1127,7 +1130,7 @@ var firmwarewizard = function() {
// - the end of the expression (if the file extension is part of the regex) // - the end of the expression (if the file extension is part of the regex)
var reMatch = new RegExp('('+matchString+')([.-]|$)'); var reMatch = new RegExp('('+matchString+')([.-]|$)');
var sitesLoadedSuccessfully = 0; var directoryLoadCount = 0;
for (var indexPath in config.directories) { for (var indexPath in config.directories) {
// retrieve the contents of the directory // retrieve the contents of the directory
loadSite(indexPath, parseSite); loadSite(indexPath, parseSite);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment