Dont try and clone properties of a null object

This commit is contained in:
Dave Conway-Jones 2020-04-21 11:14:11 +01:00
parent 0b3ced5203
commit 3f1bb6771a
No known key found for this signature in database
GPG Key ID: 302A6725C594817F
1 changed files with 1 additions and 1 deletions

View File

@ -80,7 +80,7 @@ function ensureBuffer(o) {
* @memberof @node-red/util_util
*/
function cloneMessage(msg) {
if (typeof msg !== "undefined") {
if (typeof msg !== "undefined" && msg !== null) {
// Temporary fix for #97
// TODO: remove this http-node-specific fix somehow
var req = msg.req;