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

Fix jshint errors

This commit is contained in:
Nick O'Leary 2015-08-13 22:18:47 +01:00
parent 3a6192bf73
commit 00c612485b
3 changed files with 7 additions and 5 deletions

View File

@ -33,6 +33,7 @@ RED.history = (function() {
var ev = undo_history.pop();
var i;
var node;
var subflow;
var modifiedTabs = {};
if (ev) {
if (ev.t == 'add') {
@ -73,7 +74,7 @@ RED.history = (function() {
});
}
if (ev.subflow.hasOwnProperty('changed')) {
var subflow = RED.nodes.subflow(ev.subflow.id);
subflow = RED.nodes.subflow(ev.subflow.id);
if (subflow) {
subflow.changed = ev.subflow.changed;
}
@ -89,7 +90,6 @@ RED.history = (function() {
if (ev.subflow && ev.subflow.subflow) {
RED.nodes.addSubflow(ev.subflow.subflow);
}
var subflow;
if (ev.subflowInputs && ev.subflowInputs.length > 0) {
subflow = RED.nodes.subflow(ev.subflowInputs[0].z);
subflow.in.push(ev.subflowInputs[0]);

View File

@ -271,8 +271,9 @@ RED.editor = (function() {
RED.nodes.dirty(true);
var activeSubflow = RED.nodes.subflow(RED.workspaces.active());
var subflowInstances = null;
if (activeSubflow) {
var subflowInstances = [];
subflowInstances = [];
RED.nodes.eachNode(function(n) {
if (n.type == "subflow:"+RED.workspaces.active()) {
subflowInstances.push({

View File

@ -754,6 +754,7 @@ RED.view = (function() {
redraw();
}
function deleteSelection() {
var result;
var removedNodes = [];
var removedLinks = [];
var removedSubflowOutputs = [];
@ -784,14 +785,14 @@ RED.view = (function() {
}
}
if (removedSubflowOutputs.length > 0) {
var result = RED.subflow.removeOutput(removedSubflowOutputs);
result = RED.subflow.removeOutput(removedSubflowOutputs);
if (result) {
removedLinks = removedLinks.concat(result.links);
}
}
// Assume 0/1 inputs
if (removedSubflowInputs.length == 1) {
var result = RED.subflow.removeInput();
result = RED.subflow.removeInput();
if (result) {
removedLinks = removedLinks.concat(result.links);
}