remodelled for early return

ref #159
This commit is contained in:
Nicolai Ort 2023-03-15 11:39:51 +01:00
parent 3a3e2f7157
commit b869b5fd2a
Signed by: niggl
GPG Key ID: 13AFA55AF62F269F

View File

@ -12,10 +12,11 @@
if (v === "") { if (v === "") {
return c; return c;
} }
if (c.runner) { if (!c.runner) {
return "";
}
if (v.startsWith("#")) { if (v.startsWith("#")) {
const id = parseInt(v.replace("#", "")); const id = parseInt(v.replace("#", ""));
// console.log({ id, r: c.runner.id });
if (c.runner.id === id) { if (c.runner.id === id) {
console.log(c); console.log(c);
return c; return c;
@ -27,12 +28,9 @@
} }
runnerName = runnerName.toLowerCase(); runnerName = runnerName.toLowerCase();
if (runnerName.includes(v)) { if (runnerName.includes(v)) {
console.log({ filterValue, runnerName });
// console.log(c);
return c; return c;
} }
} }
}
return ""; return "";
}); });
}, 150); }, 150);