Added null check for the button group
This commit is contained in:
parent
0cf8264c0e
commit
1bfb6e6f34
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -7,6 +7,9 @@ import { getElements } from '../util';
|
|||
function toggleFloat(): void {
|
||||
const checkedCheckboxes = document.querySelector<HTMLInputElement>('input[type="checkbox"][name="pk"]:checked');
|
||||
const buttonGroup = document.querySelector<HTMLDivElement>('div.form.form-horizontal div.btn-list');
|
||||
if (!buttonGroup) {
|
||||
return;
|
||||
}
|
||||
const isFloating = buttonGroup.classList.contains('btn-float-group-left');
|
||||
if (checkedCheckboxes !== null && !isFloating) {
|
||||
buttonGroup.classList.add('btn-float-group-left');
|
||||
|
|
|
|||
Loading…
Reference in New Issue