Skip to content

Commit

Permalink
Fix description sometimes showing "undefined"
Browse files Browse the repository at this point in the history
  • Loading branch information
Sainan committed Jun 23, 2024
1 parent 04226d0 commit 16f5a19
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -254,13 +254,14 @@ function doQuery(query)

if (typeof result.value == "object"
&& "description" in result.value
&& result.value.description != ""
)
{
tags_shown[result.value.description] = true;

let p = document.createElement("p");
p.className = "card-text";
p.textContent = dict[result.value.description] + " ";
p.textContent = (dict[result.value.description] ?? result.value.description) + " ";
{
const a = document.createElement("a");
a.textContent = "📖";
Expand Down

0 comments on commit 16f5a19

Please sign in to comment.