Skip to content

Commit

Permalink
change the Array.forEach to a traditional, c-style for loop
Browse files Browse the repository at this point in the history
  • Loading branch information
James A. Duncan committed Aug 28, 2009
1 parent 7af0560 commit 2c81c59
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions com/joyent/Sammy.js
Expand Up @@ -25,7 +25,8 @@ for ( var method in Sammy.Test.Method ) {
Sammy.generate_test = function( testArray ) {
var ta = function() {
var success = [];
testArray.forEach(function(elem) {
for ( var i = 0; i < testArray.length; i++) {
var elem = testArray[i];
if ( typeof( elem ) == 'function' ) {
if ( Sammy.debug && elem.displayName )
system.console.log("testing if request matches function " + elem.displayName);
Expand All @@ -51,7 +52,7 @@ Sammy.generate_test = function( testArray ) {
return null;
}
}
}, this);
}
return success;
};

Expand Down

0 comments on commit 2c81c59

Please sign in to comment.