fix(dashboard): 小修复和安全改进

- ProviderSourcesPanel 添加可选链 item.raw?.icon
- ChangelogDialog 和 useProviderSources 的 console.error 改为 console.warn
This commit is contained in:
LIghtJUNction
2026-03-27 19:10:26 +08:00
parent 20bd0c22b1
commit a8045851c4
3 changed files with 4 additions and 4 deletions

View File

@@ -80,8 +80,8 @@
class="me-2"
>
<v-img
v-if="item.raw.icon"
:src="item.raw.icon"
v-if="item.raw?.icon"
:src="item.raw?.icon"
alt="provider icon"
cover
/>

View File

@@ -43,7 +43,7 @@ async function getCurrentVersion() {
selectedVersion.value = version;
return version;
} catch (err) {
console.error('Failed to get version:', err);
console.warn('Failed to get version:', err);
return '';
}
}

View File

@@ -636,7 +636,7 @@ export function useProviderSources(options: UseProviderSourcesOptions) {
providers.value = response.data.data.providers || []
}
} catch (error) {
console.error('Failed to load provider template:', error)
console.warn('Failed to load provider template:', error)
}
}