handle no report table error on script

This commit is contained in:
Jordan Blasenhauer 2024-02-21 15:30:39 +01:00
parent e9d36fe08d
commit e8163a8409

View file

@ -1,7 +1,6 @@
class Filter {
constructor(prefix = "reports") {
this.prefix = prefix;
this.container = document.querySelector(`[data-${this.prefix}-filter]`);
this.keyInp = document.querySelector("input#keyword");
this.methodValue = "all";
this.statusValue = "all";
@ -11,6 +10,11 @@ class Filter {
}
initHandler() {
this.container =
document.querySelector(`[data-${this.prefix}-filter]`) || null;
if (!this.container) return;
//METHOD HANDLER
this.container.addEventListener("click", (e) => {
try {