From f163037fc17baa2f182f42625d3f19f27b19ddc9 Mon Sep 17 00:00:00 2001 From: Chika Date: Tue, 12 Jan 2021 16:48:25 +0300 Subject: [PATCH] fix regex in table insurance middleware --- src/client/Containers/Calculation/lib/elements/tables.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/client/Containers/Calculation/lib/elements/tables.ts b/src/client/Containers/Calculation/lib/elements/tables.ts index 1aa5108..8ae9a21 100644 --- a/src/client/Containers/Calculation/lib/elements/tables.ts +++ b/src/client/Containers/Calculation/lib/elements/tables.ts @@ -44,9 +44,11 @@ const elementsTables: StoreTables = { Component: Select, props: { nameMiddleware: name => { - const targetName = name.match(/"(.*?)\"/g); + const targetName = name.match(/\"(.+)\"/); if (targetName) { - return targetName[0].replace(/"?\s?/g, ''); + return targetName[1] + .replaceAll('"', String.fromCharCode(160)) + .trim(); } return name; },