From 32acc6e60b4a8212eb6b1c04282cdcc787528b29 Mon Sep 17 00:00:00 2001 From: Andrew Hrdy Date: Sun, 11 Feb 2018 14:22:53 -0500 Subject: [PATCH] Fixed error with sort by location friendly name. Closes #36 --- CHANGELOG.md | 15 +++++++++++++-- src/components/CardContainer.js | 2 +- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3fceb1f..fa1f19d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## [2.1.1] - 2018-02-11 + +### Changed + +- Updated service worker + +### Fixed + +- Fixed searching by location friendly name + ## [2.1.0] - 2018-02-08 ### Added @@ -12,7 +22,7 @@ - Facility cards now sorted by open / closed - Facility card shadowing -- Search now includes friendly name +- Search now includes location friendly name ### Fixed @@ -31,4 +41,5 @@ [2.0.1]: https://git.gmu.edu/srct/whats-open-web/compare/v2.0...v2.0.1 -[2.1.0]: https://git.gmu.edu/srct/whats-open-web/compare/v2.0.1...v2.1-Midnight-Cherry \ No newline at end of file +[2.1.0]: https://git.gmu.edu/srct/whats-open-web/compare/v2.0.1...v2.1-Midnight-Cherry +[2.1.1]: https://git.gmu.edu/srct/whats-open-web/compare/v2.1-Midnight-Cherry...v2.1.1 \ No newline at end of file diff --git a/src/components/CardContainer.js b/src/components/CardContainer.js index a047c7e..41f1f61 100644 --- a/src/components/CardContainer.js +++ b/src/components/CardContainer.js @@ -26,7 +26,7 @@ const CardContainer = ({searchTerm, campusRegion, facilities}) => { const hasTag = index !== -1; return facilityName.includes(lSearchTerm) || facilityLocation.includes(lSearchTerm) || - facilityCategory.includes(lSearchTerm) || hasTag || facilityLocation.includes(friendlyName); + facilityCategory.includes(lSearchTerm) || hasTag || friendlyName.includes(lSearchTerm); }; return ( -- GitLab