Skip to content

Commit

Permalink
Avoid redeclaring variable
Browse files Browse the repository at this point in the history
Capitalize the constructor to avoid redeclaration.
Fixes strict mode error.
  • Loading branch information
Jonas Westerlund authored and TooTallNate committed Jul 7, 2012
1 parent e11b6b8 commit 93d4259
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,13 @@ if (process.env.NODE_DEBUG && /cluster/.test(process.env.NODE_DEBUG)) {
}

// cluster object:
function cluster() {
function Cluster() {
EventEmitter.call(this);
}
util.inherits(cluster, EventEmitter);
var cluster = module.exports = new cluster();

util.inherits(Cluster, EventEmitter);

var cluster = module.exports = new Cluster();

// Used in the master:
var masterStarted = false;
Expand Down

0 comments on commit 93d4259

Please sign in to comment.