Skip to content

Commit

Permalink
UI: minor UI improvments (complete document extracted from search res…
Browse files Browse the repository at this point in the history
…ult envelope in modal, etc)
  • Loading branch information
matskramer committed Dec 20, 2024
1 parent 8b0456e commit 8569c1a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion internal/ui/static/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,12 @@ function displayCompleteDocumentInModal(rowData) {
fields: [],
}),
}).then(data => {
modalBodyDiv.innerText = JSON.stringify(data, null, 2);
if (Array.isArray(data.documents) && data.documents.length === 0) {
displayErrorTag("No document found", modalBodyDiv);
return;
}

modalBodyDiv.innerText = JSON.stringify(data.documents[0], null, 2);

const copyButton = document.createElement("button");
copyButton.id = generateUUID();
Expand Down

0 comments on commit 8569c1a

Please sign in to comment.