mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
remove unnecessary require from JSON node
This commit is contained in:
parent
782a06ce84
commit
d5f3ba8d8a
@ -16,7 +16,6 @@
|
|||||||
|
|
||||||
module.exports = function(RED) {
|
module.exports = function(RED) {
|
||||||
"use strict";
|
"use strict";
|
||||||
var util = require("util");
|
|
||||||
|
|
||||||
function JSONNode(n) {
|
function JSONNode(n) {
|
||||||
RED.nodes.createNode(this,n);
|
RED.nodes.createNode(this,n);
|
||||||
@ -36,9 +35,7 @@ module.exports = function(RED) {
|
|||||||
msg.payload = JSON.stringify(msg.payload);
|
msg.payload = JSON.stringify(msg.payload);
|
||||||
node.send(msg);
|
node.send(msg);
|
||||||
}
|
}
|
||||||
catch(e) {
|
catch(e) { node.error(RED._("json.errors.dropped-error")); }
|
||||||
node.error(RED._("json.errors.dropped-error"));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else { node.warn(RED._("json.errors.dropped-object")); }
|
else { node.warn(RED._("json.errors.dropped-object")); }
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user