fix single entry unmatched print target
This commit is contained in:
parent
11f46c4e29
commit
d6a72f3b5a
1 changed files with 5 additions and 0 deletions
|
|
@ -1124,9 +1124,11 @@ self.kiri.license = exports.LICENSE;
|
|||
SDB['grid-apik'] = apik;
|
||||
var res = JSON.parse(xhtr.responseText);
|
||||
var sel = false;
|
||||
var first = null;
|
||||
var html = [];
|
||||
grid_targets = {};
|
||||
for (var key in res) {
|
||||
first = first || key;
|
||||
if (!SDB['grid-target']) {
|
||||
SDB['grid-target'] = key;
|
||||
sel = true;
|
||||
|
|
@ -1142,6 +1144,9 @@ self.kiri.license = exports.LICENSE;
|
|||
"</option>"
|
||||
);
|
||||
}
|
||||
if (!sel) {
|
||||
SDB['grid-target'] = first;
|
||||
}
|
||||
grid_target.innerHTML = html.join('\n');
|
||||
} else if (xhtr.status === 401) {
|
||||
$('gpapik').style.display = '';
|
||||
|
|
|
|||
Loading…
Reference in a new issue