mod_http_muc_log: Fix error in js when displaying presence is disabled
When the form is hidden, attempting to index forms[0] throws an error,
however this is harmless since the script is finished by that point.
--- a/mod_http_muc_log/static/timestamps.js Sun Dec 04 22:21:05 2022 +0100
+++ b/mod_http_muc_log/static/timestamps.js Sun Dec 04 22:23:56 2022 +0100
@@ -12,8 +12,10 @@
tag.setAttribute("title", date.toString());
}
}
+if(document.forms.length>0){
document.forms[0].elements.p.addEventListener("change", function() {
document.forms[0].submit();
+}
});
})();