From 1fec3d2571433085cdf9af54a08e0dbe2d377c65 Mon Sep 17 00:00:00 2001 From: Sanja Date: Thu, 1 Feb 2024 14:43:53 -0800 Subject: [PATCH] Remove URL parameters only when the value is not defined --- .../js/processes-catalogue/components/ProcessesCatalogue.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/js/processes-catalogue/components/ProcessesCatalogue.vue b/resources/js/processes-catalogue/components/ProcessesCatalogue.vue index b654e205ad..80743f4fe7 100644 --- a/resources/js/processes-catalogue/components/ProcessesCatalogue.vue +++ b/resources/js/processes-catalogue/components/ProcessesCatalogue.vue @@ -202,8 +202,8 @@ export default { this.showWizardTemplates = false; // Remove guided_templates and template parameters from the URL - const url = new URL(window.location.href); - if (url.search.includes("?guided_templates=true")) { + if (value !== undefined) { + const url = new URL(window.location.href); url.searchParams.delete("guided_templates"); url.searchParams.delete("template"); history.pushState(null, "", url); // Update the URL without triggering a page reload