fix level upgrade issue, add error catch. fix last uesd printer logic

This commit is contained in:
Stewart Allen 2019-03-26 10:53:13 -04:00
commit b58a31a1c7
3 changed files with 8 additions and 4 deletions

View file

@ -1124,6 +1124,7 @@ self.kiri.license = exports.LICENSE;
SDB['grid-apik'] = apik;
var res = JSON.parse(xhtr.responseText);
var sel = false;
var match = false;
var first = null;
var html = [];
grid_targets = {};
@ -1135,6 +1136,7 @@ self.kiri.license = exports.LICENSE;
} else {
sel = SDB['grid-target'] === key;
}
match = match || sel;
grid_targets[html.length] = key;
html.push(
"<option id='gpo-'" + key + " value='" +key + "'" +
@ -1144,7 +1146,7 @@ self.kiri.license = exports.LICENSE;
"</option>"
);
}
if (!sel) {
if (!match) {
SDB['grid-target'] = first;
}
grid_target.innerHTML = html.join('\n');