fixing race condition in document linking to jounral entries
Deploy / deploy (push) Successful in 38s
Deploy / deploy (push) Successful in 38s
This commit is contained in:
@@ -138,9 +138,8 @@ function initApp() {
|
||||
ctx = canvas.getContext('2d');
|
||||
resizeCanvas();
|
||||
|
||||
loadTeams().then(() => {
|
||||
loadEvents();
|
||||
loadDocuments();
|
||||
loadTeams().then(async () => {
|
||||
await Promise.all([loadEvents(), loadDocuments()]);
|
||||
});
|
||||
loadNetworkData();
|
||||
|
||||
@@ -426,7 +425,8 @@ function renderInlineDocLinks(desc) {
|
||||
if (!ids.length) return '';
|
||||
const labels = ids.map(id => {
|
||||
const d = documents.find(x => x.id == id);
|
||||
return d ? `<a href="#" onclick="event.preventDefault();openDocument(${id})" class="doc-link-badge" style="display:inline-block;padding:1px 6px;margin:1px;border-radius:3px;background:var(--neptune-accent);color:#fff;font-size:.65rem;text-decoration:none;">${esc(d.title)}</a>` : '';
|
||||
const label = d ? esc(d.title) : 'doc #' + id;
|
||||
return `<a href="#" onclick="event.preventDefault();openDocument(${id})" class="doc-link-badge" style="display:inline-block;padding:1px 6px;margin:1px;border-radius:3px;background:var(--neptune-accent);color:#fff;font-size:.65rem;text-decoration:none;">${label}</a>`;
|
||||
}).join('');
|
||||
return labels ? '<small class="text-secondary me-1"><i class="fas fa-file-alt me-1"></i></small>' + labels : '';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user