1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Merge pull request #2396 from amodelbello/master

Replace pvorb/clone with lodash.clonedeep to prevent errors when cloning complex objects
This commit is contained in:
Nick O'Leary 2020-04-01 20:22:40 +01:00 committed by GitHub
commit 1b5654001c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 3 deletions

1
.gitignore vendored
View File

@ -22,3 +22,4 @@ packages/node_modules/@node-red/editor-client/public
!test/**/node_modules
docs
!packages/node_modules/**/docs
.vscode

View File

@ -48,6 +48,7 @@
"js-yaml": "3.13.1",
"json-stringify-safe": "5.0.1",
"jsonata": "1.8.1",
"lodash.clonedeep": "^4.5.0",
"media-typer": "1.1.0",
"memorystore": "1.6.2",
"mime": "2.4.4",

View File

@ -19,8 +19,7 @@
* @mixin @node-red/util_util
*/
const clone = require("clone");
const clonedeep = require("lodash.clonedeep");
const jsonata = require("jsonata");
const safeJSONStringify = require("json-stringify-safe");
const util = require("util");
@ -88,7 +87,7 @@ function cloneMessage(msg) {
var res = msg.res;
delete msg.req;
delete msg.res;
var m = clone(msg);
var m = clonedeep(msg);
if (req) {
m.req = req;
msg.req = req;

View File

@ -19,6 +19,7 @@
"i18next": "15.1.2",
"json-stringify-safe": "5.0.1",
"jsonata": "1.8.1",
"lodash.clonedeep": "^4.5.0",
"when": "3.7.8"
}
}