Avoid marking node as changed if label state is default

Fixes #2009
This commit is contained in:
Nick O'Leary 2018-12-19 09:29:39 +00:00
parent afe9367bac
commit b837f7608c
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
1 changed files with 2 additions and 2 deletions

View File

@ -1209,7 +1209,7 @@ RED.editor = (function() {
node.l = false;
} else {
// A link node - default state is false
if (node.hasOwnProperty('l')) {
if (node.hasOwnProperty('l') && node.l) {
changes.l = node.l
changed = true;
}
@ -1219,7 +1219,7 @@ RED.editor = (function() {
// Checked - show label
if (!/^link (in|out)$/.test(node.type)) {
// Not a link node - default state is true
if (node.hasOwnProperty('l')) {
if (node.hasOwnProperty('l') && !node.l) {
changes.l = node.l
changed = true;
}