Skip to content

Commit

Permalink
workaround for rega nan values (#2, rdmtc/RedMatic#381)
Browse files Browse the repository at this point in the history
  • Loading branch information
hobbyquaker committed Aug 3, 2020
1 parent 54e10da commit be43b85
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ class Rega {
if (err) {
callback(err);
} else {
// Todo: remove ugly workaround for https://github.com/rdmtc/RedMatic/issues/381
res = res.replace(/, "val": nan,/g, ', "val": null,');
try {
callback(null, JSON.parse(res));
} catch (_) {
Expand Down

0 comments on commit be43b85

Please sign in to comment.