From 183740d73976afa82ef44f1fd2f6d8f6d308c7b9 Mon Sep 17 00:00:00 2001 From: Neenad Ingole Date: Tue, 6 Feb 2018 21:31:33 +0530 Subject: [PATCH] fix(seed): React Challenges showing unwanted brackets (#16595) Closes #16528 --- common/app/routes/Challenges/utils/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/app/routes/Challenges/utils/index.js b/common/app/routes/Challenges/utils/index.js index abbe766115..516fb47701 100644 --- a/common/app/routes/Challenges/utils/index.js +++ b/common/app/routes/Challenges/utils/index.js @@ -118,7 +118,8 @@ export function createTests({ tests = [] }) { .map(test => { if (typeof test === 'string') { return { - text: ('' + test).split('message: ').pop().replace(/\'\);/g, ''), + text: ('' + test).split('message: ') + .pop().replace(/(\'\);(\s*\};)?)/g, ''), testString: test }; }