button: all writing strings like "1.0" in label without removing the decimals

This commit is contained in:
bordun 2021-04-21 16:17:02 +02:00
parent 824a62aaa8
commit 1c5876246b
2 changed files with 4 additions and 1 deletions

View file

@ -2,6 +2,9 @@
## 1.9.1
- bug fixes
- button: all writing strings like `"1.0"` in `label` without removing the decimals
- midi
- allow sending note off with velocity
- add option for receiving note off with velocity

View file

@ -703,7 +703,7 @@ class Widget extends EventEmitter {
propValue = propValue.replace(new RegExp(k, 'g'), v)
}
if (isJSON(propValue)) {
if (isJSON(propValue) && (propName !== 'label' || propValue === 'false')) {
try {
propValue = JSON.parse(propValue)
} catch (err) {}