Fix linting

This commit is contained in:
Nick O'Leary 2024-05-13 14:33:35 +01:00
parent 18d0fa2259
commit a745ddc164
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
2 changed files with 12 additions and 12 deletions

View File

@ -29,7 +29,14 @@ RED.history = (function() {
}
return RED.nodes.junction(id);
}
function ensureUnlocked(id, flowsToLock) {
const flow = id && (RED.nodes.workspace(id) || RED.nodes.subflow(id) || null);
const isLocked = flow ? flow.locked : false;
if (flow && isLocked) {
flow.locked = false;
flowsToLock.add(flow)
}
}
function undoEvent(ev) {
var i;
var len;
@ -78,21 +85,14 @@ RED.history = (function() {
RED.nodes.dirty(false);
const flowsToLock = new Set()
function ensureUnlocked(id) {
const flow = id && (RED.nodes.workspace(id) || RED.nodes.subflow(id) || null);
const isLocked = flow ? flow.locked : false;
if (flow && isLocked) {
flow.locked = false;
flowsToLock.add(flow)
}
}
imported.nodes.forEach(function(n) {
if (ev.changed[n.id]) {
ensureUnlocked(n.z)
ensureUnlocked(n.z, flowsToLock)
n.changed = true;
}
if (ev.moved[n.id]) {
ensureUnlocked(n.z)
ensureUnlocked(n.z, flowsToLock)
n.moved = true;
}
})

View File

@ -223,7 +223,7 @@ RED.notifications = (function() {
}
newTimeout = newOptions.hasOwnProperty('timeout')?newOptions.timeout:timeout
if (!fixed || newOptions.fixed === false) {
newTimeout === newTimeout || 5000
newTimeout = newTimeout || 5000
}
if (newOptions.buttons) {
var buttonSet = $('<div class="ui-dialog-buttonset"></div>').appendTo(nn)