Fix: Partner-Tab Usersuche — null-Guard + Mindestzeichen 2→1 für kurze Namen, SW by-v549
This commit is contained in:
parent
558fdaa49e
commit
df104c2c57
3 changed files with 4 additions and 4 deletions
|
|
@ -1958,11 +1958,11 @@ window.Page_admin = (() => {
|
|||
clearTimeout(_searchTimeout);
|
||||
_grantUserId = null;
|
||||
const q = searchInput.value.trim();
|
||||
if (q.length < 2) { grantResult.innerHTML = ''; return; }
|
||||
if (q.length < 1) { grantResult.innerHTML = ''; return; }
|
||||
_searchTimeout = setTimeout(async () => {
|
||||
try {
|
||||
const users = await API.get(`/api/admin/users/search?q=${encodeURIComponent(q)}`);
|
||||
if (!users.length) {
|
||||
if (!users || !users.length) {
|
||||
grantResult.innerHTML = `<p style="font-size:var(--text-xs);color:var(--c-text-muted)">Kein User gefunden.</p>`;
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue