only process find if not undefined

This commit is contained in:
DJ2LS 2023-02-19 13:52:54 +01:00
parent 59a26bb96b
commit f43bf44f51

View file

@ -235,6 +235,8 @@ window.addEventListener("DOMContentLoaded", () => {
},
})
.then(function (result) {
if (typeof result !== "undefined") {
// handle result
document.getElementById("user_info_callsign").value =
result.docs[0].callsign;
@ -252,6 +254,7 @@ window.addEventListener("DOMContentLoaded", () => {
result.docs[0].website;
document.getElementById("user_info_comments").value =
result.docs[0].comments;
}
})
.catch(function (err) {
console.log(err);