diff --git a/coap/coap-request.js b/coap/coap-request.js index 7d71e3a..edfb380 100644 --- a/coap/coap-request.js +++ b/coap/coap-request.js @@ -75,12 +75,7 @@ module.exports = function (RED) { reqOpts.headers["Content-Format"] = config["content-format"]; reqOpts.multicast = config.multicast; reqOpts.multicastTimeout = config.multicastTimeout; - reqOpts.confirmable = msg.confirmable; - - if (reqOpts.confirmable == null) { - - reqOpts.confirmable = config.confirmable; - } + reqOpts.confirmable = msg.confirmable ?? config.confirmable ?? true; function _onResponse(res) { function _send(payload) { diff --git a/package.json b/package.json index f154c95..6f20960 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "reporter": "spec" }, "jshintConfig": { - "esversion": 6, + "esversion": 11, "curly": true, "forin": true, "immed": true,