diff --git a/services/web-ui/public/data.jsx b/services/web-ui/public/data.jsx index 4665441..2568ff6 100644 --- a/services/web-ui/public/data.jsx +++ b/services/web-ui/public/data.jsx @@ -18,7 +18,7 @@ async function apiFetch(path, opts = {}) { const res = await fetch(API + path, { credentials: 'include', ...opts, - headers: { 'Content-Type': 'application/json', ...(opts.headers || {}) }, + headers: { ...(opts.headers || {}), 'Content-Type': 'application/json' }, }); // 401 from any API call means there's no live session. Bounce to the // login screen instead of leaving the app in a half-loaded state. @@ -76,7 +76,7 @@ function normalizeAsset(a, projectMap) { comments: 0, progress: 0, tc: a.start_tc || null, - seed: a.id ? a.id.charCodeAt(0) % 6 : 1, + seed: a.id ? Array.from(a.id.replace(/-/g, '')).reduce((acc, c) => acc + c.charCodeAt(0), 0) % 6 : 1, }; }