mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 18:39:52 +01:00
Add null check to mute rule submits to prevent error flood
This commit is contained in:
parent
7fcb8312b9
commit
72ae2503ae
1 changed files with 1 additions and 1 deletions
|
@ -2,7 +2,7 @@ import {createDeleteEvent, createSubmitEvent} from "retrospring/features/setting
|
|||
|
||||
export default (): void => {
|
||||
const submit: HTMLButtonElement = document.getElementById('new-rule-submit') as HTMLButtonElement;
|
||||
if (submit.classList.contains('js-initialized')) return;
|
||||
if (!submit || submit.classList.contains('js-initialized')) return;
|
||||
|
||||
const rulesList = document.querySelector<HTMLDivElement>('.js-rules-list');
|
||||
rulesList.querySelectorAll<HTMLDivElement>('.form-group:not(.js-initalized)').forEach(entry => {
|
||||
|
|
Loading…
Reference in a new issue