fix: extract arrays from API response objects

This commit is contained in:
Hiro
2026-03-28 12:27:15 +00:00
parent 98e9eb3fb4
commit 76d19d3bc7

View File

@@ -12,11 +12,14 @@ export async function renderDashboard(app) {
let selectedLibrary = app.state.selectedLibrary || null; let selectedLibrary = app.state.selectedLibrary || null;
try { try {
[documents, libraries, tags] = await Promise.all([ const [docResult, libResult, tagResult] = await Promise.all([
api.getDocuments(), api.getDocuments(),
api.getLibraries(), api.getLibraries(),
api.getTags() api.getTags()
]); ]);
documents = docResult.documents || [];
libraries = libResult.libraries || [];
tags = tagResult.tags || [];
} catch (e) { } catch (e) {
app.showToast('Failed to load data', 'error'); app.showToast('Failed to load data', 'error');
} }