web: add var declarations
Since scripts are run in module mode, they follow the "strict mode" semantics. Variables must be declared prior to being assigned (e.g. cannot have `x = 1` without declaring x (using var, let, or const) Signed-off-by: Aidan Oldershaw <aoldershaw@pivotal.io>
This commit is contained in:
parent
c02133dcee
commit
b518fb1742
|
@ -355,7 +355,7 @@ Graph.prototype.addSpacingNodes = function() {
|
|||
this.setNode(spacingNode.id, spacingNode);
|
||||
}
|
||||
|
||||
currentCustomData = (i == 0 ? initialCustomData : null)
|
||||
var currentCustomData = (i == 0 ? initialCustomData : null)
|
||||
this.addEdge(upstreamNode.id, spacingNode.id, edge.key, currentCustomData);
|
||||
|
||||
upstreamNode = spacingNode;
|
||||
|
|
|
@ -168,7 +168,7 @@ function redrawFunction(svg, jobs, resources, newUrl) {
|
|||
var graphNodes = graph.nodes()
|
||||
for (var i in graphNodes) {
|
||||
if (graphNodes[i].status == "failed") {
|
||||
xCenter = graphNodes[i].position().x + (graphNodes[i].width() / 2)
|
||||
var xCenter = graphNodes[i].position().x + (graphNodes[i].width() / 2)
|
||||
var found = false
|
||||
for (var i in failureCenters) {
|
||||
if (Math.abs(xCenter - failureCenters[i]) < epsilon) {
|
||||
|
|
Loading…
Reference in New Issue