syntax: use targetName variable

This commit is contained in:
vchikalkin 2021-01-11 15:54:08 +03:00 committed by Chika
parent 821fd1bf8e
commit be9fd2c3e4

View File

@ -46,7 +46,7 @@ const elementsTables: StoreTables<ITableElement> = {
nameMiddleware: name => {
const targetName = name.match(/"(.*?)\"/g);
if (targetName) {
return name.match(/"(.*?)\"/g)[0].replace(/"?\s?/g, '');
return targetName[0].replace(/"?\s?/g, '');
}
return name;
},