mirror of
https://github.com/Sea-Haven-Industries/meal-order-manager.git
synced 2026-10-07 16:18:54 +00:00
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:
parent
411c8bcadb
commit
2c28502a6f
1 changed files with 6 additions and 1 deletions
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue