Permalink
Browse files

Fix iterating array like an object so Array.prototype can be modified…

… safely.
  • Loading branch information...
1 parent 6b5d612 commit 3a59177655b1dcc41791662ba1b53c8bf5614ccb @demian85 demian85 committed Sep 7, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/mysql-pool/pool.js
@@ -89,7 +89,7 @@ MySQLPool.prototype._forEach = function _forEach(params) {
};
}
- for(var i in this._connectionPool) {
+ for(var i = 0, len = this._connectionPool.length; i < len; i++) {
var client = this._connectionPool[i];
params.method.apply(client, args.concat(mkCallback(client)));
}

0 comments on commit 3a59177

Please sign in to comment.