Cleaned up Promise

f_influx-checks
Ruakij 3 years ago
parent bb3d843895
commit d7a9530b68

@ -25,10 +25,8 @@ class InfluxPointWriter extends Writable{
_flush(next){
this._api.flush(true)
.then(
next,
(err) => { next(new Error(`WriteApi rejected promise for flush: ${err}`)); }
);
.catch((err) => { next(new Error(`WriteApi rejected promise for flush: ${err}`)); })
.then(next);
}
}

Loading…
Cancel
Save