|
@@ -214,17 +214,17 @@
|
|
|
* @returns
|
|
|
*/
|
|
|
export const getInstrumentName = (instruments: any, instrumentName: string) => {
|
|
|
- const _instrumentName = instrumentName.replace(/ /g, ' ').toLocaleLowerCase()
|
|
|
+ const _instrumentName = instrumentName.replace(/ /g, '').toLocaleLowerCase()
|
|
|
const _instrument = Object.keys(instruments)
|
|
|
for (let i = 0; i < _instrument.length; i++) {
|
|
|
- const _name = _instrument[i].replace(/ /g, ' ').toLocaleLowerCase()
|
|
|
+ const _name = _instrument[i].replace(/ /g, '').toLocaleLowerCase()
|
|
|
if (_name === _instrumentName) {
|
|
|
return instruments[_instrument[i]] || ''
|
|
|
}
|
|
|
}
|
|
|
for (let i = 0; i < _instrument.length; i++) {
|
|
|
- const _name = _instrument[i].replace(/ /g, ' ').toLocaleLowerCase()
|
|
|
- if (_instrumentName.includes(_name)) {
|
|
|
+ const _name = _instrument[i].replace(/ /g, '').toLocaleLowerCase()
|
|
|
+ if (_name.includes(_instrumentName)) {
|
|
|
return instruments[_instrument[i]] || ''
|
|
|
}
|
|
|
}
|