Fix: Null reference when sending messages through a non-comment window.
This commit is contained in:
parent
bc9c59c92c
commit
8942046a1c
1 changed files with 4 additions and 1 deletions
|
@ -76,7 +76,10 @@ function transferBux(mobile=false) {
|
|||
|
||||
function submitFormAjax(e) {
|
||||
for (elementId in ['message', 'message-mobile', 'message-preview', 'message-preview-mobile']) {
|
||||
document.getElementById(elementId).classList.add("d-none");
|
||||
const element = document.getElementById(elementId);
|
||||
if (element !== null) {
|
||||
element.classList.add("d-none");
|
||||
}
|
||||
}
|
||||
|
||||
const form = e.target;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue