Is there any way to load the page of the current URL? I have tried the below code. It redirects to the URL, but, keeps loading the page and doesn't show any result.
import { LightningElement, api } from 'lwc';
import LCP_ICONS from '@salesforce/resourceUrl/lcp_icons';
export default class LcpLicenceDetailSection extends LightningElement {
get associatedLicenceDetails() {
for (let licence of this.detailsObj.associatedLicences) {
let url = new URL(window.location.href);
let searchParams = url.searchParams;
searchParams.delete('id');
searchParams.set('licenceNumber', licence.licenceNumber);
licence.detailsLink = url;
}
return this.sortArrayByText(this.detailsObj.associatedLicences, 'name');
}
}