mirror of https://github.com/node-red/node-red.git
Fix def can be undefined if the type is missing
parent
7a3741165b
commit
c6895713ed
|
@ -2357,13 +2357,13 @@ RED.nodes = (function() {
|
|||
node.type = "unknown";
|
||||
}
|
||||
if (node._def.category != "config") {
|
||||
if (n.hasOwnProperty('inputs') && def.defaults.hasOwnProperty("inputs")) {
|
||||
if (n.hasOwnProperty('inputs') && node._def.defaults.hasOwnProperty("inputs")) {
|
||||
node.inputs = parseInt(n.inputs, 10);
|
||||
node._config.inputs = JSON.stringify(n.inputs);
|
||||
} else {
|
||||
node.inputs = node._def.inputs;
|
||||
}
|
||||
if (n.hasOwnProperty('outputs') && def.defaults.hasOwnProperty("outputs")) {
|
||||
if (n.hasOwnProperty('outputs') && node._def.defaults.hasOwnProperty("outputs")) {
|
||||
node.outputs = parseInt(n.outputs, 10);
|
||||
node._config.outputs = JSON.stringify(n.outputs);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue