Open btopro opened 1 month ago
related somewhere in here. The route isnt updated even when location is matched. We might need to forcibly set the record for the route as it appears that history.replaceState isn't doing what it's supposed to as far as triggering a route change event.
else if (
e.detail.location.route.name === "home" &&
e.detail.location.search.startsWith("?p=/") &&
this.lookupRoute(
e.detail.location.search.replace("?p=/", "").split("&")[0],
)
) {
let item = this.lookupRoute(
e.detail.location.search.replace("?p=/", "").split("&")[0],
)[0];
store.activeId = item.id;
globalThis.history.replaceState(
{},
null,
e.detail.location.search.replace("?p=/", "").split("&")[0],
);
e.detail.location.search = e.detail.location.search.replace("?p=/", "").split("&")[0];
store.location = e.detail.location;
My guess on editor is the conditional render block is messing with it. The 1st blog post could just be shown on the 1st page and avoid some null route issues but that's not really the point..