mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46: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.classList[state ? 'remove' : 'add']('hidden');
|
||||||
warningEl.parentNode.classList[state ? 'add' : 'remove']('has-warning');
|
warningEl.parentNode.classList[state ? 'add' : 'remove']('has-warning');
|
||||||
};
|
};
|
||||||
|
if (!inputEl) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
inputEl.addEventListener('keyup', function (e) {
|
inputEl.addEventListener('keyup', function (e) {
|
||||||
if (Login._capsState && e.key === 'CapsLock') {
|
if (Login._capsState && e.key === 'CapsLock') {
|
||||||
toggle(false);
|
toggle(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user