Fix: Partner-Tab Usersuche — null-Guard + Mindestzeichen 2→1 für kurze Namen, SW by-v549

This commit is contained in:
rene 2026-04-30 13:53:51 +02:00
parent 558fdaa49e
commit df104c2c57
3 changed files with 4 additions and 4 deletions

View file

@ -3,7 +3,7 @@
Router, State-Management, Navigation, Initialisierung.
============================================================ */
const APP_VER = '525'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
const APP_VER = '526'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen
const APP_VERSION = '1.1.1'; // ← semantische Version, wird bei make release gesetzt
const IS_STAGING = location.hostname === 'staging.banyaro.app';

View file

@ -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;
}