only process find if not undefined

This commit is contained in:
DJ2LS 2023-02-19 13:55:06 +01:00
parent f43bf44f51
commit 809ac01672

View file

@ -235,8 +235,7 @@ window.addEventListener("DOMContentLoaded", () => {
},
})
.then(function (result) {
if (typeof result !== "undefined") {
if (typeof(result.docs[0]) !== "undefined") {
// handle result
document.getElementById("user_info_callsign").value =
result.docs[0].callsign;