fix regex in table insurance middleware

This commit is contained in:
Chika 2021-01-12 16:48:25 +03:00
parent 68e0f44baa
commit f163037fc1

View File

@ -44,9 +44,11 @@ const elementsTables: StoreTables<ITableElement> = {
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;
},