From 77cec39c4b644cc248d7d020b4ab0791bb8c0fde Mon Sep 17 00:00:00 2001 From: KenavR Date: Thu, 29 Oct 2020 19:37:38 +0100 Subject: [PATCH] Spaces in titles are replaced by hyphen for category title matching to support spaces in titles. --- store/data.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/store/data.js b/store/data.js index 30feec1..eb4138f 100644 --- a/store/data.js +++ b/store/data.js @@ -21,7 +21,7 @@ export const getters = { findCategory: state => categoryTitle => { // equalsCategoryTitle :: Category -> Bool const equalsCategoryTitle = R.compose( - R.equals(cleanString(categoryTitle)), cleanString, R.prop('title'), + R.equals(cleanString(categoryTitle)), R.replace(/ /g, '-') ,cleanString, R.prop('title'), ) // findCategory :: [Category] -> Category const findCategory = R.find(equalsCategoryTitle)