Skip to content

Commit 0827494

Browse files
committed
fix(web-ui): add error handling for relative time formatting
1 parent af054e2 commit 0827494

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

web-ui/session-helpers.mjs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,11 @@ export async function loadSessions(api, options = {}) {
269269
const t = typeof this.t === 'function' ? this.t : null;
270270
if (typeof t === 'function') {
271271
for (const session of this.sessionsList) {
272-
session.updatedAtLabel = formatSessionTimelineTimestamp(session.updatedAt || '', t);
272+
try {
273+
session.updatedAtLabel = formatSessionTimelineTimestamp(session.updatedAt || '', t);
274+
} catch (e) {
275+
session.updatedAtLabel = session.updatedAt || '';
276+
}
273277
}
274278
}
275279
emitSessionLoadDebug(this, 'loadSessions:response', `sessions=${this.sessionsList.length}`);

0 commit comments

Comments
 (0)