Skip to content

Commit

Permalink
clean up syntax for #9
Browse files Browse the repository at this point in the history
  • Loading branch information
mafintosh committed Jan 5, 2016
1 parent 11ce6d3 commit 1768e6e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Monitor.prototype.start = function() {
var clock = 60000

var loop = function() {
var cmd = (typeof(self.command)=='function' ? self.command() : self.command)
var cmd = typeof self.command === 'function' ? self.command() : self.command
var child = spawn(cmd[0], cmd.slice(1), {
cwd: self.cwd,
env: xtend(process.env, self.env),
Expand Down Expand Up @@ -205,7 +205,7 @@ Monitor.prototype._stopped = function() {
}

var respawn = function(command, opts) {
if (typeof(command) != 'function' && !Array.isArray(command)) return respawn(command.command, command)
if (typeof command !== 'function' && !Array.isArray(command)) return respawn(command.command, command)
return new Monitor(command, opts || {})
}

Expand Down

0 comments on commit 1768e6e

Please sign in to comment.