fix: make sure things load properly on login/signup

This commit is contained in:
Andy Burke 2025-09-12 11:41:15 -07:00
parent f760156651
commit e52a9e997c
5 changed files with 81 additions and 61 deletions

View file

@ -48,14 +48,14 @@ export function get_events_collection_for_topic(topic_id: string): FSDB_COLLECTI
organize: (id) => {
TOPIC_EVENT_ID_MATCHER.lastIndex = 0;
const {
groups: {
event_type,
event_id
}
} = TOPIC_EVENT_ID_MATCHER.exec(id ?? '') ?? {
groups: {}
};
const groups: Record<string, string> | undefined = TOPIC_EVENT_ID_MATCHER.exec(id ?? '')?.groups;
if (!groups) {
throw new Error('Could not parse event id: ' + id);
}
const event_type = groups.event_type;
const event_id = groups.event_id;
return [
event_type,