Skip to content

Commit

Permalink
Fix uids mistakenly taken for an id
Browse files Browse the repository at this point in the history
  • Loading branch information
jazzzz committed Oct 8, 2012
1 parent 094ebd4 commit 2b2ebbc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/forever.js
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,10 @@ forever.tail = function (target, length, callback) {
// Finds the process with the specified index.
//
forever.findByIndex = function (index, processes) {
var proc = processes && processes[parseInt(index, 10)];
var indexAsNum = parseInt(index, 10);
if (indexAsNum == index) {
var proc = processes && processes[indexAsNum];
}
return proc ? [proc] : null;
};

Expand Down

0 comments on commit 2b2ebbc

Please sign in to comment.