fix: apply CodeRabbit auto-fixes

Fixed 1 file(s) based on 1 unresolved review comment.

Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
This commit is contained in:
coderabbitai[bot] 2026-07-30 23:15:45 +00:00 • committed by GitHub
parent 411c8bcadb
commit 2c28502a6f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -368,7 +368,12 @@ async function loadRoster() {
try {
const res = await fetch(ROSTER_URL);
const data = await res.json();
employees = data.employees || ROSTER;
const candidate = data.employees;
if (Array.isArray(candidate) && candidate.every(e => typeof e.name === 'string' && typeof e.email === 'string')) {
employees = candidate;
} else {
employees = ROSTER;
}
} catch (e) {}
const select = document.getElementById('emp-name');