mirror of
https://github.com/lasthead0/yandex2mqtt.git
synced 2025-08-08 09:01:00 +03:00
Some refactoring
This commit is contained in:
@@ -7,7 +7,7 @@ function convertToYandexValue(val, actType) {
|
|||||||
try {
|
try {
|
||||||
const value = parseFloat(val);
|
const value = parseFloat(val);
|
||||||
return isNaN(value) ? 0.0 : value;
|
return isNaN(value) ? 0.0 : value;
|
||||||
} catch {
|
} catch(e) {
|
||||||
console.error(`Can't parse to float: ${val}`);
|
console.error(`Can't parse to float: ${val}`);
|
||||||
return 0.0;
|
return 0.0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user