mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
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:
parent
3790e3949e
commit
8198eedf78
@ -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));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user