mirror of
https://github.com/koodiklinikka/nimilaput.git
synced 2026-01-26 03:14:03 +00:00
Undefined schmundefined...
This commit is contained in:
2
magic.js
2
magic.js
@@ -78,7 +78,7 @@ async function handleSearch(event) {
|
|||||||
let i = 0;
|
let i = 0;
|
||||||
for (const { im, rn, dn } of results) {
|
for (const { im, rn, dn } of results) {
|
||||||
const el = document.createElement("a");
|
const el = document.createElement("a");
|
||||||
Object.assign(el.dataset, { im, rn, dn });
|
Object.assign(el.dataset, { im: im || "", rn: rn || "", dn: dn || "" });
|
||||||
el.innerText = [rn, dn].filter(Boolean).join(" / ");
|
el.innerText = [rn, dn].filter(Boolean).join(" / ");
|
||||||
el.onclick = handleAddFromSearchResult;
|
el.onclick = handleAddFromSearchResult;
|
||||||
el.href = "#";
|
el.href = "#";
|
||||||
|
|||||||
Reference in New Issue
Block a user