Browse files

initialize arrays as such. this fixes parallel validation. closes #4

  • Loading branch information...
1 parent f24400c commit 7925056cd7698ccc7369c06364bf9dd693649fb4 Daniel Thornton committed with relud Apr 3, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 web/js/reductions.js
View
8 web/js/reductions.js
@@ -63,8 +63,8 @@ function WyeDeltaTool(board) {
function series_test (resistors) {
console.log("series_test");
var i, j; // iterators
- var nodes; // node array
- var connected, uncleared; // resistor array
+ var nodes = []; // node array
+ var connected = [], uncleared = []; // resistor array
var r; // resistor
var n; // node
var flag; // boolean
@@ -137,7 +137,7 @@ function series_reduce (resistors) {
function parallel_test (resistors) {
console.log("parallel_test");
var i; // iterator
- var nodes, uncleared; // node array
+ var nodes = [], uncleared = []; // node array
var n; // node
var r; // resistor
@@ -221,7 +221,7 @@ function delta_wye_reduce (resistors) {
function wye_delta_test (resistors) {
console.log("wye_delta_test");
var i, j; // iterators
- var nodes; // node array
+ var nodes = []; // node array
var n; // node
var r; // resistor
var flag; // boolean

0 comments on commit 7925056

Please sign in to comment.