修复选择数据源的问题
This commit is contained in:
@@ -974,7 +974,9 @@
|
||||
try {
|
||||
const response = await fetch('/api/sources');
|
||||
const sources = await response.json();
|
||||
dom.sourceCount.textContent = `${Array.isArray(sources) ? sources.length : 0} 个数据源`;
|
||||
const sourcesArray = Array.isArray(sources) ? sources : [];
|
||||
dom.sourceCount.textContent = `${sourcesArray.length} 个数据源`;
|
||||
updateSourceFilterOptions(sourcesArray);
|
||||
} catch (err) {
|
||||
// ignore
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user