Handle clone of null in utils

Fixes #2536
This commit is contained in:
Nick O'Leary
2020-04-24 13:43:57 +01:00
parent 3dfbefb9f5
commit a3b0448f53

View File

@@ -81,7 +81,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;