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

Prevent node z property getting set to 0 or ""

This commit is contained in:
Nick O'Leary 2020-10-19 13:24:04 +01:00
parent e8e44f9a32
commit dc26022fb4
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -553,6 +553,9 @@ RED.nodes = (function() {
node.id = n.id;
node.type = n.type;
node.z = n.z;
if (node.z === 0 || node.z === "") {
delete node.z;
}
if (n.d === true) {
node.d = true;
}
@ -1351,6 +1354,9 @@ RED.nodes = (function() {
users:[],
_config:{}
};
if (!n.z) {
delete configNode.z;
}
if (n.hasOwnProperty('d')) {
configNode.d = n.d;
}