mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-05-20 21:30:28 +08:00
fix: 更安全的dataSource迁移方式
This commit is contained in:
@@ -56,8 +56,9 @@ export function loadDataSources(): DataSource[] {
|
||||
const parsed = JSON.parse(raw)
|
||||
|
||||
if (!isValidDataSourceArray(parsed)) {
|
||||
apiLogger.warn('[DataSource] Incompatible config format detected (likely pre-0.17.4). Resetting to [].')
|
||||
saveDataSources([])
|
||||
apiLogger.warn(
|
||||
'[DataSource] Incompatible config format detected (likely pre-0.17.4), returning empty in memory.'
|
||||
)
|
||||
return []
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user