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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user