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

@ -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) {}