launcher: midi device names containing multiple spaces not parsed correctly

This commit is contained in:
bordun 2020-10-13 19:17:38 +02:00
parent bd0e9e35d5
commit f48fa3bd49
2 changed files with 6 additions and 1 deletions

View file

@ -1,5 +1,10 @@
# Changelog
## 1.5.2
- bug fixes
- launcher: midi device names containing multiple spaces not parsed correctly
## 1.5.1
- bug fixes

View file

@ -171,7 +171,7 @@ class Settings {
toggle.classList.toggle('on', v)
} else if (v && data.type === 'array'){
v = v.replace(/("[^"]*"|'[^']*')/g, (m)=>{
return m.substr(1, m.length - 2).replace(/\s/, '_SPaCE_')
return m.substr(1, m.length - 2).replace(/\s/g, '_SPaCE_')
})
v = v.split(' ')
v = v.map(x=>x.replace(/_SPaCE_/g, ' '))