mirror of
https://github.com/node-red/node-red
synced 2024-11-21 23:48:30 +00:00
Replace 'clone' with 'lodash.clonedeep'
This commit is contained in:
parent
c1dae95f71
commit
021df83c3f
1
.gitignore
vendored
1
.gitignore
vendored
@ -22,3 +22,4 @@ packages/node_modules/@node-red/editor-client/public
|
|||||||
!test/**/node_modules
|
!test/**/node_modules
|
||||||
docs
|
docs
|
||||||
!packages/node_modules/**/docs
|
!packages/node_modules/**/docs
|
||||||
|
.vscode
|
@ -48,6 +48,7 @@
|
|||||||
"js-yaml": "3.13.1",
|
"js-yaml": "3.13.1",
|
||||||
"json-stringify-safe": "5.0.1",
|
"json-stringify-safe": "5.0.1",
|
||||||
"jsonata": "1.7.0",
|
"jsonata": "1.7.0",
|
||||||
|
"lodash.clonedeep": "^4.5.0",
|
||||||
"media-typer": "1.1.0",
|
"media-typer": "1.1.0",
|
||||||
"memorystore": "1.6.1",
|
"memorystore": "1.6.1",
|
||||||
"mime": "2.4.4",
|
"mime": "2.4.4",
|
||||||
|
@ -19,8 +19,8 @@
|
|||||||
* @mixin @node-red/util_util
|
* @mixin @node-red/util_util
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
const clone = require("clone");
|
const clone = require("clone");
|
||||||
|
const clonedeep = require("lodash.clonedeep");
|
||||||
const jsonata = require("jsonata");
|
const jsonata = require("jsonata");
|
||||||
const safeJSONStringify = require("json-stringify-safe");
|
const safeJSONStringify = require("json-stringify-safe");
|
||||||
const util = require("util");
|
const util = require("util");
|
||||||
@ -87,7 +87,8 @@ function cloneMessage(msg) {
|
|||||||
var res = msg.res;
|
var res = msg.res;
|
||||||
delete msg.req;
|
delete msg.req;
|
||||||
delete msg.res;
|
delete msg.res;
|
||||||
var m = clone(msg);
|
|
||||||
|
var m = clonedeep(msg);
|
||||||
if (req) {
|
if (req) {
|
||||||
m.req = req;
|
m.req = req;
|
||||||
msg.req = req;
|
msg.req = req;
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
"i18next": "15.1.2",
|
"i18next": "15.1.2",
|
||||||
"json-stringify-safe": "5.0.1",
|
"json-stringify-safe": "5.0.1",
|
||||||
"jsonata": "1.7.0",
|
"jsonata": "1.7.0",
|
||||||
|
"lodash.clonedeep": "^4.5.0",
|
||||||
"when": "3.7.8"
|
"when": "3.7.8"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user