ui: Minor change with renaming a variable

Tests:

- In apps and system page, removing the last tag from search bar keeps the same
page but without any filtering.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
Sunil Mohan Adapa 2025-03-10 13:13:24 -07:00
parent 3790e3949e
commit 8198eedf78
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2

View File

@ -26,15 +26,15 @@
/**
* Update the URL path based on the selected tags.
*
* If no tags are selected, redirects to the base apps path. Otherwise,
* If no tags are selected, redirects to the base section path. Otherwise,
* constructs a new URL with query parameters for each tag.
*
* @param {string[]} tags - An array of selected tag names.
*/
function updatePathWithTags(tags) {
const appsPath = window.location.pathname;
const sectionPath = window.location.pathname;
if (tags.length === 0) {
this.location.assign(appsPath);
this.location.assign(sectionPath);
} else {
const urlParams = new URLSearchParams();
tags.forEach(tag => urlParams.append('tag', tag));