mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
fix: dont crash if login el doesnt exist
This commit is contained in:
@@ -83,7 +83,9 @@ define('forum/login', ['jquery-form'], function () {
|
||||
warningEl.classList[state ? 'remove' : 'add']('hidden');
|
||||
warningEl.parentNode.classList[state ? 'add' : 'remove']('has-warning');
|
||||
};
|
||||
|
||||
if (!inputEl) {
|
||||
return;
|
||||
}
|
||||
inputEl.addEventListener('keyup', function (e) {
|
||||
if (Login._capsState && e.key === 'CapsLock') {
|
||||
toggle(false);
|
||||
|
||||
Reference in New Issue
Block a user