fix: TS type error — invoke returns array not single object
All checks were successful
Build & Sign Wraith / Build Windows + Sign (push) Successful in 2m49s

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Vantz Stockwell 2026-03-18 03:09:23 -04:00
parent 6c7b277494
commit ee857474e3

View File

@ -104,8 +104,8 @@ export const useSessionStore = defineStore("session", () => {
// If connection has a linked credential, decrypt it from the vault
if (conn.credentialId) {
try {
const cred = await invoke<{ id: number; name: string; username: string | null; credentialType: string; sshKeyId: number | null }>("list_credentials")
.then((creds: any[]) => creds.find((c: any) => c.id === conn.credentialId));
const allCreds = await invoke<{ id: number; name: string; username: string | null; credentialType: string; sshKeyId: number | null }[]>("list_credentials");
const cred = allCreds.find((c) => c.id === conn.credentialId);
if (cred) {
resolvedUsername = cred.username ?? "";