From 4c0afae38e459011c13c7a44786e72713ba484bd Mon Sep 17 00:00:00 2001 From: Matchu Date: Thu, 21 Jan 2021 17:35:03 -0800 Subject: [PATCH] Fix bug that caused filter text "NC you own" --- src/app/WardrobePage/SearchToolbar.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/WardrobePage/SearchToolbar.js b/src/app/WardrobePage/SearchToolbar.js index bb86cad..c3094a3 100644 --- a/src/app/WardrobePage/SearchToolbar.js +++ b/src/app/WardrobePage/SearchToolbar.js @@ -391,13 +391,17 @@ function getQueryFilterText(query) { } if (query.filterToCurrentUserOwnsOrWants === "OWNS") { - if (textWords.length === 0) { + if (!query.filterToItemKind && !query.filterToZoneLabel) { textWords.push("Items"); + } else if (query.filterToItemKind && !query.filterToZoneLabel) { + textWords.push("items"); } textWords.push("you own"); } else if (query.filterToCurrentUserOwnsOrWants === "WANTS") { - if (textWords.length === 0) { + if (!query.filterToItemKind && !query.filterToZoneLabel) { textWords.push("Items"); + } else if (query.filterToItemKind && !query.filterToZoneLabel) { + textWords.push("items"); } textWords.push("you want"); }