fix: config is already a parsed object from the jobs API response #61

Merged
josh merged 2 commits from feat/jobs-system into dev 2026-03-28 20:47:46 -04:00
Showing only changes of commit 027ed52768 - Show all commits

View File

@@ -318,9 +318,7 @@ async function _snapshotJobBaseline() {
async function _waitForOnCreateJobs(baseline) {
const jobs = await fetch('/api/jobs').then(r => r.json());
const relevant = jobs.filter(j => {
try { return JSON.parse(j.config || '{}').run_on_create; } catch { return false; }
});
const relevant = jobs.filter(j => (j.config ?? {}).run_on_create);
if (!relevant.length) return;
const deadline = Date.now() + 30_000;