Bug fix for loading pages with params! I think this has been a root cause of some of the issues for a while now.

This commit is contained in:
Scott Idem
2024-07-18 09:21:29 -04:00
parent 43488b8f76
commit 070e714aff
3 changed files with 150 additions and 159 deletions

View File

@@ -3,7 +3,7 @@ console.log(`ae_events_pres_mgmt_event [slug] +page.ts start`);
import { events_func } from '$lib/ae_events_functions';
export async function load({ parent }) { // route
export async function load({ params, parent }) { // route
// console.log(`ae_events_pres_mgmt_event +page.ts data.params:`, params);
// console.log(`ae_events_pres_mgmt_event +page.ts data.route:`, route);
// console.log(`ae_events_pres_mgmt_event +page.ts data.url:`, url);
@@ -24,9 +24,9 @@ export async function load({ parent }) { // route
// let param_slug_event_id = data.params.slug;
let event_id = data.params.slug;
let event_id = params.slug;
if (!event_id) {
console.log(`events_pres_mgmt_event [slug] +layout.ts: The event_id was not found in the data.params.slug!!!`);
console.log(`events_pres_mgmt_event [slug] +layout.ts: The event_id was not found in the params.slug!!!`);
return false;
}