Skip to content

Commit

Permalink
Fix findById which was incorrectly returning matches due to use of do…
Browse files Browse the repository at this point in the history
…uble rather than triple equals operator.
  • Loading branch information
JamieMcNaught committed Aug 29, 2015
1 parent 6f8beb1 commit a957354
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/forever.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -681,15 +681,15 @@ forever.tail = function (target, options, callback) {

//
// ### function findById (id, processes)
// #### @index {string} Index of the process to find.
// #### @id {string} id of the process to find.
// #### @processes {Array} Set of processes to find in.
// Finds the process with the specified index.
//
forever.findById = function (id, processes) {
if (!processes) { return null; }

var procs = processes.filter(function (p) {
return p.id == id;
return p.id === id;
});

if (procs.length === 0) { procs = null; }
Expand Down

0 comments on commit a957354

Please sign in to comment.