diff --git a/src/routes/idaa/(idaa)/recovery_meetings/ae_idaa_comp__event_obj_id_edit_v2.svelte b/src/routes/idaa/(idaa)/recovery_meetings/ae_idaa_comp__event_obj_id_edit_v2.svelte index 277cca4f..ddcb9911 100644 --- a/src/routes/idaa/(idaa)/recovery_meetings/ae_idaa_comp__event_obj_id_edit_v2.svelte +++ b/src/routes/idaa/(idaa)/recovery_meetings/ae_idaa_comp__event_obj_id_edit_v2.svelte @@ -643,13 +643,19 @@ Copy and paste link: ${ } } - // Rebuild the Zoom full URL whenever Meeting ID, Passcode, Encrypted Passcode, or Domain changes + // Rebuild the Zoom full URL whenever Meeting ID, Passcode, Encrypted Passcode, or Domain changes. + // IMPORTANT: Guard attend_json.zoom before accessing its sub-properties. + // Background SWR re-fires (load_ae_obj_li__event in +layout.ts) can overwrite + // $idaa_slct.event_obj with a fresh IDB record where attend_json = {} (no zoom key), + // even if the Zoom button was already clicked. Without the guard, the access to + // attend_json.zoom.passcode_enc below throws a TypeError and crashes the component. $effect(() => { if ( $idaa_trig == 'update_zoom_full_url' && $idaa_slct.event_obj.attend_url_code && $idaa_slct.event_obj.attend_url_passcode && - $idaa_sess.recovery_meetings.attend_platform === 'Zoom' + $idaa_sess.recovery_meetings.attend_platform === 'Zoom' && + $idaa_slct.event_obj.attend_json?.zoom // guard: zoom may be undefined after IDB re-fire ) { $idaa_trig = null; @@ -1106,8 +1112,12 @@ Copy and paste link: ${ - - {#if $idaa_sess.recovery_meetings.attend_platform === 'Zoom'} + + {#if $idaa_sess.recovery_meetings.attend_platform === 'Zoom' && $idaa_slct.event_obj.attend_json?.zoom}