fix(badges): reports background fetch guard used wrong field name
$ae_api.api_key does not exist — the field is api_secret_key. The guard evaluated to true on every render, returning immediately and never calling search__event_badge. Changed to base_url which is the standard readiness check per the quickstart doc. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -25,7 +25,7 @@ let event_id = $derived(page.params.event_id);
|
|||||||
// Fire a background refresh — liveQuery below will reactively pick up new data.
|
// Fire a background refresh — liveQuery below will reactively pick up new data.
|
||||||
$effect(() => {
|
$effect(() => {
|
||||||
const eid = event_id;
|
const eid = event_id;
|
||||||
if (!eid || !$ae_api?.api_key) return;
|
if (!eid || !$ae_api?.base_url) return;
|
||||||
// try_cache defaults to true — results are written to IDB so liveQuery picks them up.
|
// try_cache defaults to true — results are written to IDB so liveQuery picks them up.
|
||||||
events_func.search__event_badge({
|
events_func.search__event_badge({
|
||||||
api_cfg: $ae_api,
|
api_cfg: $ae_api,
|
||||||
|
|||||||
Reference in New Issue
Block a user