0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-25 18:22:42 +00:00

Make tag removal from URL case insensitive

This commit is contained in:
G.Ambatte
2023-12-03 17:17:03 +13:00
parent 875e1023fc
commit 995d1c63d8

View File

@@ -151,10 +151,10 @@ const ListPage = createClass({
let filterTags = urlParams.getAll('tag');
if(filterTag != '') {
if(!filterTags.includes(filterTag)){
if(filterTags.findIndex((tag)=>{return tag.toLowerCase()==filterTag.toLowerCase();}) == -1){
filterTags.push(filterTag);
} else {
filterTags = filterTags.filter((tag)=>{ return tag != filterTag; });
filterTags = filterTags.filter((tag)=>{ return tag.toLowerCase() != filterTag.toLowerCase(); });
}
}
urlParams.delete('tag');