From f11c12f777fd2e418a0efa6b097fb6df33e388f2 Mon Sep 17 00:00:00 2001 From: manubo Date: Thu, 17 Oct 2019 09:46:44 +0200 Subject: [PATCH] Revert find projects by identifier without alphanumerical characters --- src/js/utils/index.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/js/utils/index.js b/src/js/utils/index.js index 89ac2c6..c207d9d 100644 --- a/src/js/utils/index.js +++ b/src/js/utils/index.js @@ -25,7 +25,6 @@ export const ERROR_UNKNOWN = "unknown" export const noop = () => null export const asArray = input => (Array.isArray(input) ? input : [input]) -export const removeNonAlphanumChars = input => String(input ?? "").replace(/[\W_]/g, "") export const findProjectBy = prop => val => projects => { if (!val) { @@ -33,11 +32,7 @@ export const findProjectBy = prop => val => projects => { } return compose( - find( - project => - project[prop] === val || - removeNonAlphanumChars(project[prop]) === removeNonAlphanumChars(val), - ), + find(pathEq(prop, val)), flatMap(get("options")), )(projects) }